Peter --

...and then Peter Scott said...
% 
% At 01:15 PM 6/22/02 -0500, David T-G wrote:
% >
% >...and then Peter Scott said...
% >%
...
% >% Eh?  The n and s commands do exactly that.  See also the r command.
% >
% >He didn't mean the perl debgger; he meant sh -x :-)
% 
% Oops; somehow I read "Shell" as "Perl".

No problem; I figured as much :-)


% 
...
% >Yeah.  What we really want is a command or flag that does exactly what -x
% >does :-)  I forget whether or not -x stays on when you jump into a 
% >function,
% 
% Would you like tracing that goes off when you go into a function?  Suppose
% if you gave a numeric argument to 't' it would trace up to that depth 
% in subroutine calls beneath the current level but not beneath?  That 
% might be doable (as a patch to the debugger).

Hmmm...  That's a pretty attractive idea, actually.  The point of -x,
which certainly isn't much for one used to a debugger, is simply to print
out each command that goes on and, as a bonus, see the values the script
has at the time, and it's expected that you just dump that (stderr) off
to a file and peruse it at leisure.  The problem I've always had with a
debugger is that you have to set breakpoints or step through EVERY SINGLE
BLASTED STEP in order to see what's going on, and you want to not descend
too far down into functions and such, and you still have to print values
when you want to see how they're set at the time.

I realize that the debugger is enormously powerful, and I'll lay a Twinkie
on the line betting that with just a little experience the breakpoint thing
gets to be downright easy and it's second nature to print something when
you want to see it -- but dammit, Jim, I'm a novice, not a Perl monger!


...
% >  [ $var = true ]
% >
% >in your script).
% 
% Not really feasible for anything except simple scalars... that's good 
% enough for the shell, but Perl goes much further.

Yeah, I know :-)


% --
% Peter Scott
% Pacific Systems Design Technologies
% http://www.perldebugged.com/


Thanks & HAND

:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg26398/pgp00000.pgp
Description: PGP signature

Reply via email to