On Wed Feb 23 19:05:09 2011, MSCHWERN wrote:
Show quoted text> I was trying out Data::Dumper::Simple and discovered that it does not
> work on the command line.
>
> $ perl -wle 'use Data::Dumper::Simple; print Dumper(42)'
> Undefined subroutine &main::Dumper called at -e line 1.
Welcome to the wonderful world of source filters :(
Try this:
$ perl -MData::Dumper::Simple -wle 'print Dumper(42)'
print (...) interpreted as function at -e line 1.
$42 = 42;
Fun!
Check out my Data::Dumper::Names. ::Simple was always listed a simple debugging tool.
::Names is a touch more robust as it's not a source filter and uses PadWalker to figure out the
variable names.
Cheers,
Ovid