X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldebtut.pod;h=ece58482697f83e2c35213a8ed3c7b8a26db10cf;hb=738498554754dd90699c8e9143242cd60b1e5e37;hp=ac6086482b991c61a08cbfeca2d974341448e635;hpb=d1f7ad93e0c409f8012442de50b4a05b72a38518;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldebtut.pod b/pod/perldebtut.pod index ac60864..ece5848 100644 --- a/pod/perldebtut.pod +++ b/pod/perldebtut.pod @@ -168,7 +168,7 @@ break/watch/actions |[|]db_cmd Send output to pager ![!] syscmd Run cmd in a subprocess q or ^D Quit R Attempt a restart Data Examination: expr Execute perl code, also see: s,n,t expr - x|m expr Evals expr in array context, dumps the result or lists methods. + x|m expr Evals expr in list context, dumps the result or lists methods. p expr Print expression (uses script's current package). S [[!]pat] List subroutine names [not] matching pattern V [Pk [Vars]] List Variables in Package. Vars can be ~pattern or !pattern. @@ -294,7 +294,7 @@ Well, this isn't very easy to read, and using the helpful manual (B), the 8 'this' 9 'that' -That's not much help, a couple of welcome's in there, but no indication of +That's not much help, a couple of welcomes in there, but no indication of which are keys, and which are values, it's just a listed array dump and, in this case, not particularly helpful. The trick here, is to use a B to the data structure: @@ -327,7 +327,7 @@ our expected output: While we're here, take a closer look at the 'B' command, it's really useful and will merrily dump out nested references, complete objects, partial objects -- justabout whatever you throw at it: +- just about whatever you throw at it: Let's make a quick object and x-plode it, first we'll start the the debugger: it wants some form of input from STDIN, so we give it something non-commital, @@ -452,7 +452,7 @@ expected output. This is what it does: Not very consistent! We'll set a breakpoint in the code manually and run it under the debugger to see what's going on. A breakpoint is a flag, to which -the debugger will run without interuption, when it reaches the breakpoint, it +the debugger will run without interruption, when it reaches the breakpoint, it will stop execution and offer a prompt for further interaction. In normal use, these debugger commands are completely ignored, and they are safe - if a little messy, to leave in production code. @@ -495,7 +495,7 @@ And a print to show what values we're currently using: DB<1> p $deg, $num f33.3 - + We can put another break point on any line beginning with a colon, we'll use line 17 as that's just as we come out of the subroutine, and we'd like to pause there later on: @@ -538,7 +538,7 @@ it for inspection. In this case though, we simply continue down to line 29: DB<4> c 29 main::f2c(temp:29): return $c; - + And have a look at the return value: DB<5> p $c @@ -616,7 +616,7 @@ the DEBUGGING flag for this one: floating `'$ at 4..2147483647 (checking floating) stclass `EXACTF ' anchored(BOL) minlen 4 Omitting $` $& $' support. - + EXECUTING... Freeing REx: `^pe(a)*rl$' @@ -656,7 +656,7 @@ script from the command-line, try something like this: > perl -d my_cgi.pl -nodebug -Of course 'L' and L will tell you more. +Of course L and L will tell you more. =head1 GUIs @@ -717,5 +717,5 @@ Ronald J Kimball Hugo van der Sanden -Peter Scott +Peter Scott