in reply to Package variables and Parse::RecDescent

Since the "my" variables are within a local scope, and you are defining subroutines within that scope, you can take advantage of the fact that the subroutines act as closures.

Why not add another subroutine before init_parser, like this:

sub getChecksyntax { return $checksyntax; }

If you call it from the code blocks of your grammar you should have what you need.

Replies are listed 'Best First'.
Re: Re: Package variables and Parse::RecDescent
by castaway (Parson) on Jan 08, 2003 at 13:35 UTC
    That works wonderfully, thanks!
    C.