}
$pretype = [$1];
next CMD; };
- $cmd =~ /^n$/ && do {
+ $cmd =~ /^y(?:\s+(\d*)\s*(.*))?$/ && do {
+ eval { require PadWalker; PadWalker->VERSION(0.08) }
+ or &warn($@ =~ /locate/
+ ? "PadWalker module not found - please install\n"
+ : $@)
+ and next CMD;
+ do 'dumpvar.pl' unless defined &main::dumpvar;
+ defined &main::dumpvar
+ or print $OUT "dumpvar.pl not available.\n"
+ and next CMD;
+ my @vars = split(' ', $2 || '');
+ my $h = eval { PadWalker::peek_my(($1 || 0) + 1) };
+ $@ and $@ =~ s/ at .*//, &warn($@), next CMD;
+ my $savout = select($OUT);
+ dumpvar::dumplex($_, $h->{$_},
+ defined $option{dumpDepth}
+ ? $option{dumpDepth} : -1,
+ @vars)
+ for sort keys %$h;
+ select($savout);
+ next CMD; };
+ $cmd =~ /^n$/ && do {
end_report(), next CMD if $finished and $level <= 1;
$single = 2;
$laststep = $cmd;
}
}
next CMD; };
- $cmd =~ /^\@\s*(.*\S)/ && do {
+ $cmd =~ /^source\s+(.*\S)/ && do {
if (open my $fh, $1) {
push @cmdfhs, $fh;
} else {
}
sub cmd_l {
+ my $current_line = $line;
my $line = shift;
$line =~ s/^-\s*$/-/;
if ($line =~ /^(\$.*)/s) {
my ($stop,$action);
($stop,$action) = split(/\0/, $dbline{$i}) if
$dbline{$i};
- $arrow = ($i==$line
+ $arrow = ($i==$current_line
and $filename eq $filename_ini)
? '==>'
: ($dbline[$i]+0 ? ':' : ' ') ;
B<V> [I<pkg> [I<vars>]] List some (default all) variables in package (default current).
Use B<~>I<pattern> and B<!>I<pattern> for positive and negative regexps.
B<X> [I<vars>] Same as \"B<V> I<currentpackage> [I<vars>]\".
+B<y> [I<n> [I<Vars>]] List lexicals in higher scope <n>. Vars same as B<V>.
B<x> I<expr> Evals expression in list context, dumps the result.
B<m> I<expr> Evals expression in list context, prints methods callable
on the first element of the result.
. ( $rc eq $sh ? "" : "
B<$psh> [I<cmd>] Run I<cmd> in subshell (forces \"\$SHELL -c 'cmd'\")." ) . "
See 'B<O> I<shellBang>' too.
-B<@>I<file> Execute I<file> containing debugger commands (may nest).
+B<source> I<file> Execute I<file> containing debugger commands (may nest).
B<H> I<-number> Display last number commands (default all).
B<p> I<expr> Same as \"I<print {DB::OUT} expr>\" in current package.
B<|>I<dbcmd> Run debugger command, piping DB::OUT to current pager.
B<H> [I<-num>] Display last num commands B<a> [I<ln>] I<cmd> Do cmd before line
B<=> [I<a> I<val>] Define/list an alias B<A> I<ln|*> Delete a/all actions
B<h> [I<db_cmd>] Get help on command B<w> I<expr> Add a watch expression
- B<h h> Complete help page B<W> I<expr|*> Delete a/all watch expressions
+ B<h h> Complete help page B<W> I<expr|*> Delete a/all watch exprs
B<|>[B<|>]I<db_cmd> Send output to pager B<$psh>\[B<$psh>\] I<syscmd> Run cmd in a subprocess
B<q> or B<^D> Quit B<R> Attempt a restart
I<Data Examination:> B<expr> Execute perl code, also see: B<s>,B<n>,B<t> I<expr>
. ( $rc eq $sh ? "" : "
B<$psh> [I<cmd>] Run I<cmd> in subshell (forces \"\$SHELL -c 'cmd'\")." ) . "
See 'B<O> I<shellBang>' too.
-B<@>I<file> Execute I<file> containing debugger commands (may nest).
+B<source> I<file> Execute I<file> containing debugger commands (may nest).
B<H> I<-number> Display last number commands (default all).
B<p> I<expr> Same as \"I<print {DB::OUT} expr>\" in current package.
B<|>I<dbcmd> Run debugger command, piping DB::OUT to current pager.