The sub is only eval'ed once per new.
I bet it (->parse) doesn't run slowly. The time is probably spent parsing the grammar, compiling it into Perl code, and compiling the Perl code (->new). Parse::RecDescent shouldn't be used directly in production code. Modules created by Parse::RecDescent's Precompile method should be used instead.
There is no benefit to using require here. I don't like to use use at spots other than at the top of the package, and I wanted to group the testing code together.
In reply to Re^4: Pulling data out of { }
by ikegami
in thread Pulling data out of { }
by Felix2000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |