New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data::Dumper Feature request(s): new_with_defaults & DumpValues #16137
Comments
From @kentfredricCreated by @kentfredricThis feature request is for two new additional features to The first of which should be implemented *before* adding any new syntax The first feature, new_with_defaults, is sorely needed for anyone who As it currently stands, anyone using Data::Dumper in CPAN code in a - The name of every possible feature Which means every additional feature requires additional safeguards Anyone[7] setting $Data::Dumper::Foo will change the defaults for anyone I've prototyped[3] an example implementation of how I expect this to local $Data::Dumper::Indent = 5; Naturally, there's a few logical warts inside, but they don't need to There's more writing in my implementation docs, but the gist of it are, - new_with_defaults takes either 1 or 0 arguments ( Values and Names - the instance created should have the same settings/results, - the instance created should be invulnerable to people setting - the instance should support a hash of settings that match the exposed The overall design ethic is to create a Data::Dumper interface that The second feature, DumpValues, aims to address additional issues with This I have also roughly prototyped the interface of[6], and the Data::Dumper->new_with_defaults()->DumpValues( [ values ], [ names ] ); Should behave exactly as a *stock* unmodified call of Data::Dumper::Dumper( [values], [names] ) Does, but without all the risks of other people changing your defaults. DumpValues should also *ignore* all and any predefined values of: - Seen Including those passed in the event somebody did: Data::Dumper->new( $somevalues, $somenames )->DumpValues( $othervalues ) Additonally, DumpValues should *invalidate* any values of Seen, Names, This is because those state preservation mechanics aren't deemed to be The way those mechanics are implemented seems as if they're there for NB: I have no hard affinity for any of the names I've stated here, just 1: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=126812 Perl Info
|
Migrated from rt.perl.org#132027 (status was 'new')
Searchable as RT132027$
The text was updated successfully, but these errors were encountered: