Acme-Data-Dumper-Extensions

 view release on metacpan or  search on metacpan

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


=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



( run in 0.374 second using v1.01-cache-2.11-cpan-de7293f3b23 )