X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldebug.pod;h=9eb0a9e3438b738179649c899c269b0a82eaa437;hb=f49ed1dab8c52e58c3b45270b50ae23e7886790c;hp=45c2420472b660491b4a7303b1e308ee665358c2;hpb=a7b657eec5c9a956f5411ffb5c1dacbd8d5b6c1b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldebug.pod b/pod/perldebug.pod index 45c2420..9eb0a9e 100644 --- a/pod/perldebug.pod +++ b/pod/perldebug.pod @@ -39,6 +39,12 @@ Any command not recognized by the debugger is directly executed (C'd) as Perl code in the current package. (The debugger uses the DB package for keeping its own state information.) +Note that the said C is bound by an implicit scope. As a +result any newly introduced lexical variable or any modified +capture buffer content is lost after the eval. The debugger is a +nice environment to learn Perl, but if you interactively experiment using +material which should be in the same scope, stuff it in one line. + For any text entered at the debugger prompt, leading and trailing whitespace is first stripped before further processing. If a debugger command coincides with some function in your own program, merely precede the @@ -84,9 +90,10 @@ where STDOUT may be redirected to. =item x [maxdepth] expr -Evaluates its expression in list context and dumps out the result -in a pretty-printed fashion. Nested data structures are printed out -recursively, unlike the real C function in Perl. +Evaluates its expression in list context and dumps out the result in a +pretty-printed fashion. Nested data structures are printed out +recursively, unlike the real C function in Perl. When dumping +hashes, you'll probably prefer 'x \%h' rather than 'x %h'. See L if you'd like to do this yourself. The output format is governed by multiple options described under @@ -98,7 +105,7 @@ temporarily set to I. =item V [pkg [vars]] -Display all (or some) variables in package (defaulting to C
) +Display all (or some) variables in package (defaulting to C
) using a data pretty-printer (hashes show their keys and values so you see what's what, control characters are made printable, etc.). Make sure you don't put the type specifier (like C<$>) there, just @@ -192,7 +199,7 @@ executed, and print out that line. =item f filename Switch to viewing a different file or C statement. If I -is not a full pathname found in the values of %INC, it is considered +is not a full pathname found in the values of %INC, it is considered a regex. Ced strings (when accessible) are considered to be filenames: @@ -266,7 +273,7 @@ subroutine is compiled. =item B line -Delete a breakpoint from the specified I. +Delete a breakpoint from the specified I. =item B * @@ -291,7 +298,7 @@ For example, this will print out $foo every time line =item A line -Delete an action from the specified line. +Delete an action from the specified line. =item A * @@ -300,7 +307,7 @@ Delete all installed actions. =item w expr Add a global watch-expression. We hope you know what one of these -is, because they're supposed to be obvious. +is, because they're supposed to be obvious. =item W expr @@ -339,18 +346,21 @@ For historical reasons, the C<=value> is optional, but defaults to 1 only where it is safe to do so--that is, mostly for Boolean options. It is always better to assign a specific value using C<=>. The C