Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

How to grab Parse::RecDescent error output in a variable?

by w-ber (Hermit)
on Sep 11, 2008 at 15:26 UTC ( #710640=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $ParseError;
    
    ...
    
    my $p = Parse::RecDescent->new($grammar) or die "Invalid grammar";
    my $output = $p->startrule($str) or die $ParseError;
    
  2. or download this
        open(STDERR, '>', '/tmp/error') or die $!;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://710640]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2015-07-28 08:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls