HTML::Mason::Compiler::ToObject - A Compiler subclass that generates Mason object code
my $compiler = HTML::Mason::Compiler::ToObject->new; my $object_code = $compiler->compile( comp_source => $source, name => $comp_name );
This Compiler subclass generates Mason object code (Perl code). It is the default Compiler class used by Mason.
All of these parameters are optional.
The class into which component objects are blessed. This defaults to HTML::Mason::Component.
HTML::Mason::Component
The class into which subcomponent objects are blessed. This defaults to HTML::Mason::Subcomponent.
HTML::Mason::Subcomponent
This is the package in which a component's code is executed. For historical reasons, this defaults to HTML::Mason::Commands.
HTML::Mason::Commands
If this parameter is supplied, then the text given is placed at the beginning of each component.
Text given for this parameter is placed at the end of each component.
This indicates whether or not a given component should use strict. By default, this is true.
use strict
This class is primarily meant to be used by the Interpreter object, and as such has a very limited public API.
This method will take component source and return the compiled object code for that source. The comp_source and name parameters are optional. The comp_class can be used to change the component class for this one comonent.
comp_source
name
comp_class
To install HTML::Mason, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Mason
CPAN shell
perl -MCPAN -e shell install HTML::Mason
For more information on module installation, please visit the detailed CPAN module installation guide.