May 26, 2018

Make Petal go faster by compiling the expressions

This module provides a CodeGenerator for Petal that inherits almost everything from PetalCodeGenerator but modifies how expressions are dealt with. Petal normally includes code like this

$hash->get “notuser”

in the compiled template. This means the path has to be parsed and interpreted at runtime. Using PetalCodePerl, Petal will now produce this

! $hash->”user”

which will be much faster.

It uses ParseRecDescent to parse the PETALES expressions which makes it a bit slow to load the module but this won’t matter much unless you have turned off caching. It won’t matter at all for something like Apache’s mod_perl.

WWW http//