Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Basic debugging checklist

by Anonymous Monk
on Oct 03, 2014 at 02:58 UTC ( #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
Node Status?
node history
Node Type: note [id://1102695]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2020-08-05 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (35 votes). Check out past polls.

    Notices?