Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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 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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2023-09-23 08:03 GMT
Find Nodes?
    Voting Booth?

    No recent polls found