Text::MicroMason::ExecuteCache - Use cache for execute step
Instead of using this class directly, pass its name to be mixed in:
use Text::MicroMason; my $mason = Text::MicroMason->new( -ExecuteCache );
Use the execute method to parse and evalute a template:
print $mason->execute( text=>$template, 'name'=>'Dave' );
The template does not have to be interpreted the second time because the results are cached:
print $mason->execute( text=>$template, 'name'=>'Dave' ); # fast
When run with different arguments, the template is re-interpreted and the results stored:
print $mason->execute( text=>$template, 'name'=>'Bob' ); # first time print $mason->execute( text=>$template, 'name'=>'Bob' ); # fast
This module is not finished.
This module uses a simple cache interface that is widely supported. You can use the simple cache classes provided in the Text::MicroMason::Cache:: namespace, or select other caching modules on CPAN that support the interface described in Cache::Cache.
Implemented using the @MIXINS feature provided by Text::MicroMason's class() method.
For the core functionality of this package see Text::MicroMason and Text::MicroMason::Base.
For distribution, installation, support, copyright and license information, see Text::MicroMason::ReadMe.
To install Text::MicroMason, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::MicroMason
CPAN shell
perl -MCPAN -e shell install Text::MicroMason
For more information on module installation, please visit the detailed CPAN module installation guide.