Re: Parse::RecDescent and modperl
[email protected] (Damian Conway)
| Newsgroups | perl.recdescent |
|---|---|
| Message-ID | <[email protected]> |
> > Also is it possible to dump the parser created by RecDescent
> > using Data::Dumper and then eval it back at a latter date?
>
> A section of the manual entitled "Precompiling parsers" should provide
> an adequate answer to this question. I include part of it below... type
> perldoc Parse::RecDescent on the machine you are using Parse::RecDescent
> on to read the full section
Even more useful in this situation is the undocumented 'Save' feature
that is used to implement 'Precompile':
$parser = Parse::RecDescent->new($grammar) or die;
# ...and later...
$parser->Save('Remember'); # save parser in Remember.pm
# ...and later still...
require 'Remember.pm' or die; # load Saved module
$parser = Remember->new90; # restore parser
Damian