philkime has asked for the wisdom of the Perl Monks concerning the following question:
outputs:use Data::Diver qw( Dive ); my $ref = {'original' => {'default' => 'result'}}; print Dive($ref, 'original', 'default'), "\n"; die;
result
Can't use string ("default") as a SCALAR ref while "strict refs" in use at /usr/lib/perl5/site_perl/5.14/Data/Diver.pm line 91.
...propagated at /tmp/test.pl line 7.
That is, simple Dive() use pollutes $! due to a test in the code. "no strict refs" doesn't fix it. It means that any die(), croak() etc. reports this even when you don't want it to. Am I missing something or perhaps there is an alternative non auto-vivifying module?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Data::Diver polluting $!
by roboticus (Chancellor) on Nov 01, 2012 at 12:23 UTC | |
|
Re: Data::Diver polluting $@
by Anonymous Monk on Nov 01, 2012 at 10:49 UTC | |
by tye (Sage) on Nov 01, 2012 at 13:35 UTC | |
by Anonymous Monk on Sep 26, 2015 at 00:04 UTC |