Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Newbie to PERL debugger

by ISAI student (Scribe)
on Oct 05, 2011 at 15:09 UTC ( #929825=perlquestion: print w/ replies, xml ) Need Help??
ISAI student has asked for the wisdom of the Perl Monks concerning the following question:

Hello all. I am trying to get the debugger to print out variable values based on pattern and fail miseraly. See sample code below:

#!/usr/bin/perl -w use strict; my $m=0; my $popop=1; $popop=2; __END__

I run the debugger, do b 5, and can't find the vraiable $popop. See code below:

perl -d ./ Loading DB routines from version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(./ 3: my $m=0; DB<1> b 5 DB<2> c main::(./ 5: $popop=2; 6: __END__ DB<2> X *popo* DB<3>

What am I doing wrong here?

Comment on Newbie to PERL debugger
Select or Download Code
Replies are listed 'Best First'.
Re: Newbie to PERL debugger
by runrig (Abbot) on Oct 05, 2011 at 15:19 UTC

      No luck there either.

      DB<6> X ~popo DB<7>
        Ah, X and V are only for package variables. They will not work for lexical (my) variables. You can display specific lexical variables with "x", but not by regex. It does say "y" should work for lexicals like V and X, if you have PadWalker installed (which I don't).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://929825]
Approved by marto
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2015-11-25 05:17 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (671 votes), past polls