Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by vrk (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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2017-03-23 02:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (279 votes). Check out past polls.