Acme-Data-Dumper-Extensions

 view release on metacpan or  search on metacpan

lib/Acme/Data/Dumper/Extensions.pm  view on Meta::CPAN

But its just a prototype.

For some, it will serve more as a proof-of-concept for various interfaces until
they get accepted into core.

=head1 EXPORTS

=head2 C<$_new_with_defaults>

This is a prototype function for construcing a Data::Dumper instance without
being prone to leak from other people using the global values.

At the time of this writing, if you need perfect consistency from Data::Dumper
in widely used code, you by necessity have to know every version of
Data::Dumper that exists, and know what the default values are of various
arguments, in order to revert them to your "known good" state if 3rd party
code decides to locally change those values for their own purposes.

Getting an instance of a Data::Dumper object before anyone tweaks those values
would also work, but trying to bet on getting loaded and getting an instance
before anyone else does is just foolhardy

Additionally, due to how C<< ->Values >> works, having a global instance of
Data::Dumper can lend itself to a memory leak and you have to take additional
care to make sure you free values passed to it.

=head3 Syntax

The name used here is C<$_new_with_defaults> as this makes it straight forward
to migrate code that uses this once its adopted, without needing to
monkey-patch Data::Dumper itself.

  Data::Dumper->$_new_with_defaults( ... )



( run in 0.696 second using v1.01-cache-2.11-cpan-49f99fa48dc )