in reply to Re: Using Data::Printer from the Perl debugger
in thread Using Data::Printer from the Perl debugger
Now the p command prints its argument only once.sub initialize { no warnings 'once'; # $DB::alias{p} = 's/^/use Data::Printer; /; eval $cmd'; $DB::alias{p} = 's/^/use Data::Printer; /'; }
I inserted print $cmd; before eval $cmd, entered p $my_var in the debugger, and it printed "p $my_var". Apparently the eval was unnecessary.
FWIW.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using Data::Printer from the Perl debugger
by LanX (Saint) on Mar 02, 2023 at 08:31 UTC | |
by ibm1620 (Hermit) on Mar 02, 2023 at 16:07 UTC | |
by LanX (Saint) on Mar 02, 2023 at 16:37 UTC |