HTML::Mason::Params - Constructor parameter documentation
Mason has a lot of objects, most of which accept parameters when passed to their constructor. However, since most Mason objects are made by other Mason objects, rather than by end users, Mason has been designed so that when one object contains another, the container object can accept constructor params not only for itself, but also for any of its contained objects.
This means that typically, you simply make a top level object such as an ApacheHandler or Interp object, and pass it whatever parameters you want to set for any Mason object.
Of course, many people simply configure Mason via their httpd.conf file, and don't ever make a Mason object.
This document lists all of the Mason parameters that are intended to be used by end users.
allow_globals
An array of names of Perl variables that are allowed globally within components
Type: list
Name in httpd.conf: MasonAllowGlobals
Belongs to: HTML::Mason::Compiler
apache_status_title
The title of the Apache::Status page
Type: string
Default: HTML::Mason status
Name in httpd.conf: MasonApacheStatusTitle
Belongs to: HTML::Mason::ApacheHandler
args_method
Whether to use CGI.pm or Apache::Request for parsing the incoming HTTP request
Default: mod_perl
Name in httpd.conf: MasonArgsMethod
auto_send_headers
Whether HTTP headers should be auto-generated
Type: boolean
Default: 1
Name in httpd.conf: MasonAutoSendHeaders
Belongs to: HTML::Mason::Request::ApacheHandler
autoflush
Whether output should be buffered or sent immediately
Default: 0
Name in httpd.conf: MasonAutoflush
Belongs to: HTML::Mason::Request
autohandler_name
The filename to use for Mason's 'autohandler' capability
Default: autohandler
Name in httpd.conf: MasonAutohandlerName
Belongs to: HTML::Mason::Interp
buffer_class
This class receives component output and dispatches it appropriately
Name in httpd.conf: MasonBufferClass
This object is created multiple times by its container.
code_cache_max_size
The maximum size of the component code cache
Default: 10485760
Name in httpd.conf: MasonCodeCacheMaxSize
comp_class
The class into which component objects will be blessed
Default: HTML::Mason::Component
Name in httpd.conf: MasonCompClass
Belongs to: HTML::Mason::Compiler::ToObject
comp_root
A string or array of arrays indicating the search path for component calls
Default: filesystem root
Name in httpd.conf: MasonCompRoot
Belongs to: HTML::Mason::Resolver::File
compiler
A Compiler object for compiling components
Type: object
Default: HTML::Mason::Compiler::ToObject->new
This object is created only once by its container.
compiler_class
This class is used to translate component source into code
Name in httpd.conf: MasonCompilerClass
data_cache_defaults
A hash of default parameters for Cache::Cache
Type: hash
Name in httpd.conf: MasonDataCacheDefaults
data_dir
A directory for storing cache files and other state information
Name in httpd.conf: MasonDataDir
decline_dirs
Whether Mason should decline to handle requests for directories
Name in httpd.conf: MasonDeclineDirs
default_escape_flags
Escape flags that will apply by default to all Mason tag output
Name in httpd.conf: MasonDefaultEscapeFlags
dhandler_name
The filename to use for Mason's 'dhandler' capability
Default: dhandler
Name in httpd.conf: MasonDhandlerName
error_format
How error conditions are returned to the caller (brief, text, line or html)
Default: text
Name in httpd.conf: MasonErrorFormat
error_mode
How error conditions are manifest (output or fatal)
Default: fatal
Name in httpd.conf: MasonErrorMode
ignore_warnings_expr
A regular expression describing Perl warning messages to ignore
Type: regex
Default: qr/Subroutine .* redefined/i
Name in httpd.conf: MasonIgnoreWarningsExpr
in_package
The package in which component execution will take place
Default: HTML::Mason::Commands
Name in httpd.conf: MasonInPackage
interp
A Mason interpreter for processing components
Default: HTML::Mason::Interp->new
interp_class
The interp class coordinates multiple objects to handle request execution
Name in httpd.conf: MasonInterpClass
lexer
A Lexer object that will scan component text during compilation
Default: HTML::Mason::Lexer->new
lexer_class
This class generates compiler events based on the components source
Name in httpd.conf: MasonLexerClass
max_recurse
The maximum recursion depth for component, inheritance, and request stack
Default: 32
Name in httpd.conf: MasonMaxRecurse
out_method
A subroutine or scalar reference through which all output will pass
Type: code
Default: sub { print STDOUT grep {defined} @_ }
Name in httpd.conf: MasonOutMethod
postamble
A chunk of Perl code to add to the end of each compiled component
Name in httpd.conf: MasonPostamble
postprocess_perl
A subroutine through which all Perl code will be sent during compilation
Name in httpd.conf: MasonPostprocessPerl
postprocess_text
A subroutine through which all plain text will be sent during compilation
Name in httpd.conf: MasonPostprocessText
preamble
A chunk of Perl code to add to the beginning of each compiled component
Name in httpd.conf: MasonPreamble
preloads
A list of components to load immediately when creating the Interpreter
Name in httpd.conf: MasonPreloads
preprocess
A subroutine through which all component text will be sent during compilation
Name in httpd.conf: MasonPreprocess
request_class
Objects returned by make_request are members of this class
Name in httpd.conf: MasonRequestClass
resolver
A Resolver object for fetching components from storage
Default: HTML::Mason::Resolver::File->new
resolver_class
This class is expected to return component information based on a component path
Name in httpd.conf: MasonResolverClass
static_source
When true, we only compile source files once
Name in httpd.conf: MasonStaticSource
subcomp_class
The class into which subcomponent objects will be blessed
Default: HTML::Mason::Component::Subcomponent
Name in httpd.conf: MasonSubcompClass
use_object_files
Whether to cache component objects on disk
Name in httpd.conf: MasonUseObjectFiles
use_strict
Whether to turn on Perl's 'strict' pragma in components
Name in httpd.conf: MasonUseStrict
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.