IMHO, the grammar should definitely be in single quotes since it should not be interpolated in contrast with what Abigail-II says.
You're both wrong. :-)
No just kidding. You are both right. Abigails suggestion would work fine if the $RE expanded before P::RD ever saw it. OTOH, it makes more sense to me to use your approach of use()ing the module inside of the grammar.
And personally I prefer single quoted here docs for my grammars because it avoids the double interpolation problem that can crop up unexpectedly if you arent careful.
In reply to Re: Re: Regexp::Common inside Parse::RecDescent
by demerphq
in thread Regexp::Common inside Parse::RecDescent
by rkg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |