Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by ikegami (Pope)
on Sep 12, 2008 at 10:20 UTC ( #710872=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Parse::RecDescent qw( );
    ...
    open(local *Parse::RecDescent::ERROR, '>', \my $error);
    my $p = Parse::RecDescent->new($grammar) or die "Invalid grammar";
    my $output = $p->startrule($str) or die $ParseError;
    
  2. or download this
    print("d");
    BEGIN {
    ...
    }               # outer BEGIN     executed after this line is compiled
    print("e");
                    # outermost scope executed after this line is compiled
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://710872]
help
Chatterbox?
[Corion]: :-D
[stevieb]: I suppose I'll have to delete the 2.36 ver, then re-upload 2.36.1 and 2.36.2, and re-version 2.36 as 2.36.0
[Corion]: stevieb: Naah, I wouldn't delete versions from CPAN. Just up the version to 2.37 resp. 2.37.0 / 2.37.1 etc

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2017-01-19 15:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.