Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Basic debugging checklist

by Anonymous Monk
on Oct 03, 2014 at 02:58 UTC ( [id://1102695]=note: print w/replies, xml ) Need Help??


in reply to Basic debugging checklist

perl -Mre=debug foo.pl can help you see how perl interprets your regex, much in the way O=Deparse does for perl code

Replies are listed 'Best First'.
Re^2: Basic debugging checklist
by Anonymous Monk on Oct 31, 2014 at 07:38 UTC
    If you don't quite understand what you're looking at (output of deparse, perl syntax), then ppi_dumper can help you look at the right part of the manual, an example
    $ ppi_dumper 2 PPI::Document PPI::Statement::Include PPI::Token::Word 'use' PPI::Token::Whitespace ' ' PPI::Token::Word 'constant' PPI::Token::Whitespace ' ' PPI::Token::Word 'X' PPI::Token::Whitespace ' ' PPI::Token::Operator '=>' PPI::Token::Whitespace ' ' PPI::Token::Number '1' PPI::Token::Operator '/' PPI::Token::Number '3' PPI::Token::Structure ';' PPI::Token::Whitespace '\n' PPI::Token::Whitespace '\n'

    So PPI::Token::Operator tells you "=>" is an operator

    If you read perl/"perltoc" then you'll know that operators are documented in perlop

    App::PPI::Dumper / ppi_dumper

    wxPPIxregexplain.pl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1102695]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-19 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found