This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
prevent failures deep in value dumping from aborting
Sometimes, dumpvar's dumpvalue routine gets a value it can't dump. The
simplest example to contrive is the one in this test: a tied hash that
can't tell you its keys. Until now, this would cause the whole dump to
abort as soon as it failed to dump one part.
With this commit, each stringify or unwind is inside an eval. Failed
stringifications or unwindings are replaced with a placeholder showing
the error.
unwind uses return to stop early, and rather than go through contortions
to wrap the eval in something that can then return 1 to test that eval
worked, I've just asserted that this code requires 5.14.0, which made $@
a much more reliable indicator of failure after eval.