Hi Jeremy!
I M resurrecting my work on this, trying to get it a tad further along.
On Mon Mar 26 07:37:34 2012, jtbraun wrote:
Show quoted text> ...
> 3. SQL::Translator itself uses global variables (like %tables,
> @table_comments, etc.) to keep track of the parse state. P::RD provides
> $thisparser->{local} to allow for per-parser object data. This,
> combined with integrating the new, unreleased features above gets rid of
> the need for Class::Unload in SQL::Translator.
Mmmm now that I am looking at this more carefully it actually does not answer my question at all. My main goal is to use the same *parser object* multiple times. While I understand how the globals work (it's very well described here [1]), it is not clear to me what will improve if I switch to $thisparser->{local}.
There still doesn't seem to be a clear way for me to reset/undef the contents of {local} between $parser->parse($rulename) invocations.
What would you recommend?
Cheers!
[1]
https://metacpan.org/pod/release/JTBRAUN/Parse-RecDescent-1.967_010/lib/Parse/RecDescent.pm#Start-up-Actions