in reply to Re: load a module or another: Dumper or dd
in thread load a module or another: Dumper or dd
anyway:
package MyModule; use strict; use warnings; eval { require Data::Dump; 1} or require Data::Dumper; _mydump('this is %INC',\%INC); sub _mydump{ my ( $msg, $ref) = @_; print "$msg:\n"; { local $@; eval {dd $ref}; print Dumper $ref if $@; } } #out perl sopw.pl Name "MyModule::Dumper" used only once: possible typo at sopw.pl line +15. this is %INC: print() on unopened filehandle Dumper at sopw.pl line 15.
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: load a module or another: Dumper or dd
by 1nickt (Canon) on Jan 10, 2019 at 05:31 UTC |