perldoc > HTML::Mason::Compiler::ToObject

📛 NAME

HTML::Mason::Compiler::ToObject - A Compiler subclass that generates Mason object code

🚀 Quick Reference

Use CaseCommandDescription
Compile a component$compiler->compile( comp_source => $source, name => $name, comp_path => $path )Compile Mason source into object code
Create a default compilermy $compiler = HTML::Mason::Compiler::ToObject->new;Instantiate the default Compiler class
Override component classcomp_class => 'My::Component'Bless component objects into a custom class
Enable strict modeuse_strict => 1Add use strict to every component
Enable warningsuse_warnings => 1Add use warnings to every component
Auto-detect %ARGSdefine_args_hash => 'auto'Only define %ARGS if the string ARGS appears in the component

📝 SYNOPSIS

      my $compiler = HTML::Mason::Compiler::ToObject->new;

      my $object_code =
          $compiler->compile( comp_source => $source,
                              name        => $comp_name,
                              comp_path   => $comp_path,
                            );

📖 DESCRIPTION

This Compiler subclass generates Mason object code (Perl code). It is the default Compiler class used by Mason.

📋 PARAMETERS TO THE new() CONSTRUCTOR

All of these parameters are optional.

🔑 ACCESSOR METHODS

All of the above properties have read-only accessor methods of the same name. You cannot change any property of a compiler after it has been created (but you can create multiple compilers with different properties).

⚙️ METHODS

This class is primarily meant to be used by the Interpreter object, and as such has a very limited public API.

📄 compile(...)

This method will take component source and return the compiled object code for that source. See compile(...) in HTML::Mason::Compiler for details on this method.

This subclass also accepts a comp_class parameter, allowing you to override the class into which the component is compiled.

HTML::Mason::Compiler::ToObject
📛 NAME 🚀 Quick Reference 📝 SYNOPSIS 📖 DESCRIPTION
📋 PARAMETERS TO THE new() CONSTRUCTOR
🔑 ACCESSOR METHODS ⚙️ METHODS
📄 compile(...)

Generated by phpman v4.9.29 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-20 23:10 @216.73.216.114
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^