[Petal] compiled expression (again)

Fergal Daly fergal at esatclear.ie
Wed Jun 18 03:06:11 BST 2003


here's what a nicer impementation of compiled expressions for Petal. You will 
need Petal::CodePerl and the two patches from

http://www.fergaldaly.com/computer/Text/

You will also have to download a couple of modules from CPAN.

This attempt is much better than the last couple in that

- it's documented (always a bonus)
- the Perl generation has been rewritten from scratch (resulting in several 
improvements)
- it should work with Parse::RecDescent 1.80 and 1.9x

To get it working, untar a copy of Petal-0.93 then

cd Petal-0.93
patch -p1 < ../indent.patch
patch -p1 < ../expr.patch
make test
make install

These patches will make no difference to your templates, they will generate 
the exact same code as before. However, if you add

use Petal::CodePerl;

underneath your

use Petal;

you will get a significant speed boost and some other goodies. See the README 
file for more details,

F



More information about the Petal mailing list