Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
HTML::Mason::Params(3)User Contributed Perl DocumentatioHTML::Mason::Params(3)

NAME
       HTML::Mason::Params - Mason configuration parameters

DESCRIPTION
       This document lists all of the Mason configuration parameters that are
       intended	to be used by end users.

PERL AND APACHE	NAMES
       Each parameter has two names: a Perl version and	an Apache version.
       The Perl	version	uses "lowercase_with_underscores", while the Apache
       version uses "StudlyCaps" with a	"Mason"	prefix.	The conversion from
       one version to the other	is otherwise very predictable. For example,

       o   "autohandler_name" "<-->" "MasonAutohandlerName"

       o   "comp_root" "<-->" "MasonCompRoot"

       o   "data_cache_defaults" "<-->"	"MasonDataCacheDefaults"

   Where Apache	Names Are Used
       The Apache parameter names are used in the Apache configuration file in
       an httpd-based configuration.

   Where Perl Names Are	Used
       The Perl	parameter names	are used from Perl code, i.e. anywhere other
       than the	Apache configuration file. For example,

       o   In an custom	wrapper-based configuration, you can pass most of
	   these parameters to the ApacheHandler constructor.

       o   In a	standalone Mason script, you can pass most of these parameters
	   to the Interp constructor.

       o   When	launching a subrequest,	you can	pass any of the
	   "HTML::Mason::Request" parameters to	make_subrequest.

PARAMETERS
   allow_globals
       o   Perl	name:		allow_globals

       o   Apache name:		MasonAllowGlobals

       o   Type	in httpd.conf:	list

       o   Default:		[]

       o   Belongs to:		"HTML::Mason::Compiler"

       List of variable	names, complete	with prefix ("$@%"), that you intend
       to use as globals in components.	 Normally global variables are
       forbidden by "strict", but any variable mentioned in this list is
       granted a reprieve via a	"use vars" statement. For example:

	   allow_globals => [qw($DBH %session)]

       In a mod_perl environment, $r (the request object) is automatically
       added to	this list.

   apache_status_title
       o   Perl	name:		apache_status_title

       o   Apache name:		MasonApacheStatusTitle

       o   Type	in httpd.conf:	string

       o   Default:		HTML::Mason status

       o   Belongs to:		"HTML::Mason::ApacheHandler"

       Title that you want this	ApacheHandler to appear	as under
       Apache::Status.	Default	is "HTML::Mason	status".  This is useful if
       you create more than one	ApacheHandler object and want them all visible
       via Apache::Status.

   args_method
       o   Perl	name:		args_method

       o   Apache name:		MasonArgsMethod

       o   Type	in httpd.conf:	string

       o   Default:		mod_perl

       o   Belongs to:		"HTML::Mason::ApacheHandler"

       Method to use for unpacking GET and POST	arguments. The valid options
       are 'CGI' and 'mod_perl'; these indicate	that a "CGI.pm"	or
       "Apache::Request" object	(respectively) will be created for the
       purposes	of argument handling.

       'mod_perl' is the default under mod_perl-1 and requires that you	have
       installed the "Apache::Request" package.	 Under mod_perl-2, the default
       is 'CGI'	because	"Apache2::Request" is still in development.

       If args_method is 'mod_perl', the $r global is upgraded to an
       Apache::Request object. This object inherits all	Apache methods and
       adds a few of its own, dealing with parameters and file uploads.	 See
       "Apache::Request" for more information.

       If the args_method is 'CGI', the	Mason request object ($m) will have a
       method called "cgi_object" available.  This method returns the CGI
       object used for argument	processing.

       While Mason will	load "Apache::Request" or "CGI"	as needed at runtime,
       it is recommended that you preload the relevant module either in	your
       httpd.conf or handler.pl	file, as this will save	some memory.

   auto_send_headers
       o   Perl	name:		auto_send_headers

       o   Apache name:		MasonAutoSendHeaders

       o   Type	in httpd.conf:	boolean

       o   Default:		1

       o   Belongs to:		"HTML::Mason::Request::ApacheHandler"

       True or false, default is true.	Indicates whether Mason	should
       automatically send HTTP headers before sending content back to the
       client. If you set to false, you	should call "$r->send_http_header"
       manually.

       See the sending HTTP headers section of the developer's manual for more
       details about the automatic header feature.

       NOTE: This parameter has	no effect under	mod_perl-2, since calling
       "$r->send_http_header" is no longer needed.

   autoflush
       o   Perl	name:		autoflush

       o   Apache name:		MasonAutoflush

       o   Type	in httpd.conf:	boolean

       o   Default:		0

       o   Belongs to:		"HTML::Mason::Request"

       True or false, default is false.	Indicates whether to flush the output
       buffer ("$m->flush_buffer") after every string is output. Turn on
       autoflush if you	need to	send partial output to the client, for example
       in a progress meter.

       As of Mason 1.3,	autoflush will only work if enable_autoflush has been
       set.  Components	can be compiled	more efficiently if they don't have to
       check for autoflush. Before using autoflush you might consider whether
       a few manual "$m->flush_buffer" calls would work	nearly as well.

   autohandler_name
       o   Perl	name:		autohandler_name

       o   Apache name:		MasonAutohandlerName

       o   Type	in httpd.conf:	string

       o   Default:		autohandler

       o   Belongs to:		"HTML::Mason::Interp"

       File name used for autohandlers.	Default	is "autohandler".  If this is
       set to an empty string ("") then	autohandlers are turned	off entirely.

   buffer_preallocate_size
       o   Perl	name:		buffer_preallocate_size

       o   Apache name:		MasonBufferPreallocateSize

       o   Type	in httpd.conf:	string

       o   Default:		0

       o   Belongs to:		"HTML::Mason::Interp"

       Number of bytes to preallocate in the output buffer for each request.
       Defaults	to 0. Setting this to, say, your maximum page size (or close
       to it) can reduce the number of reallocations Perl performs as
       components add to the output buffer.

   code_cache_max_size
       o   Perl	name:		code_cache_max_size

       o   Apache name:		MasonCodeCacheMaxSize

       o   Type	in httpd.conf:	string

       o   Default:		unlimited

       o   Belongs to:		"HTML::Mason::Interp"

       Specifies the maximum number of components that should be held in the
       in-memory code cache. The default is 'unlimited', meaning no components
       will ever be discarded; Mason can perform certain optimizations in this
       mode. Setting this to zero disables the code cache entirely. See	the
       code cache section of the administrator's manual	for further details.

   comp_class
       o   Perl	name:		comp_class

       o   Apache name:		MasonCompClass

       o   Type	in httpd.conf:	string

       o   Default:		HTML::Mason::Component

       o   Belongs to:		"HTML::Mason::Compiler::ToObject"

       The class into which component objects are blessed.  This defaults to
       HTML::Mason::Component.

   comp_root
       o   Perl	name:		comp_root

       o   Apache name:		MasonCompRoot

       o   Type	in httpd.conf:	list

       o   Default:		Varies

       o   Belongs to:		"HTML::Mason::Interp"

       The component root marks	the top	of your	component hierarchy and
       defines how component paths are translated into real file paths.	For
       example,	if your	component root is /usr/local/httpd/docs, a component
       path of /products/index.html translates to the file
       /usr/local/httpd/docs/products/index.html.

       Under Apache and	CGI, comp_root defaults	to the server's	document root.
       In standalone mode comp_root defaults to	the current working directory.

       This parameter may be either a scalar or	an array reference.  If	it is
       a scalar, it should be a	filesystem path	indicating the component root.
       If it is	an array reference, it should be of the	following form:

	[ [ foo	=> '/usr/local/foo' ],
	  [ bar	=> '/usr/local/bar' ] ]

       This is an array	of two-element array references, not a hash.  The
       "keys" for each path must be unique and their "values" must be
       filesystem paths.  These	paths will be searched in the provided order
       whenever	a component path is resolved. For example, given the above
       component roots and a component path of /products/index.html, Mason
       would search first for /usr/local/foo/products/index.html, then for
       /usr/local/bar/products/index.html.

       The keys	are used in several ways. They help to distinguish component
       caches and object files between different component roots, and they
       appear in the "title()" of a component.

       When you	specify	a single path for a component root, this is actually
       translated into

	 [ [ MAIN => path ] ]

       If you have turned on dynamic_comp_root,	you may	modify the component
       root(s) of an interpreter between requests by calling
       "$interp->comp_root" with a value. However, the path associated with
       any given key may not change between requests. For example, if the
       initial component root is

	[ [ foo	=> '/usr/local/foo' ],
	  [ bar	=> '/usr/local/bar' ], ]

       then it may not be changed to

	[ [ foo	=> '/usr/local/bar' ],
	  [ bar	=> '/usr/local/baz' ],

       but it may be changed to

	[ [ foo	  => '/usr/local/foo' ],
	  [ blarg => '/usr/local/blarg'	] ]

       In other	words, you may add or remove key/path pairs but	not modify an
       already-used key/path pair. The reason for this restriction is that the
       interpreter maintains a component cache per key that would become
       invalid if the associated paths were to change.

   compiler_class
       o   Perl	name:		compiler_class

       o   Apache name:		MasonCompilerClass

       o   Type	in httpd.conf:	string

       o   Default:		HTML::Mason::Compiler::ToObject

       o   Belongs to:		"HTML::Mason::Interp"

       The class to use	when creating a	compiler. Defaults to
       HTML::Mason::Compiler::ToObject.

   component_error_handler
       o   Perl	name:		component_error_handler

       o   Apache name:		MasonComponentErrorHandler

       o   Type	in httpd.conf:	code

       o   Default:		sub { package HTML::Mason::Exceptions; use
	   warnings; use strict	'refs';	my($err) = @_; return unless $err; if
	   (UNIVERSAL::can($err, 'rethrow')) { $err->rethrow; }	elsif (ref
	   $err) { die $err; } 'HTML::Mason::Exception'->throw('error',	$err);
	   }

       o   Belongs to:		"HTML::Mason::Request"

       A code reference	used to	handle errors thrown during component
       compilation or runtime. By default, this	is a subroutine	that turns
       non-exception object errors in components into exceptions. If this
       parameter is set	to a false value, these	errors are simply rethrown as-
       is.

       Turning exceptions into objects can be expensive, since this will cause
       the generation of a stack trace for each	error. If you are using
       strings or unblessed references as exceptions in	your code, you may
       want to turn this off as	a performance boost.

   data_cache_api
       o   Perl	name:		data_cache_api

       o   Apache name:		MasonDataCacheApi

       o   Type	in httpd.conf:	string

       o   Default:		1.1

       o   Belongs to:		"HTML::Mason::Request"

       The "$m->cache" API to use:

       o   '1.1', the default, indicates a "Cache::Cache" based	API.

       o   'chi' indicates a "CHI" based API.

       o   '1.0' indicates the custom cache API	used in	Mason 1.0x and
	   earlier. This compatibility layer is	provided as a convenience for
	   users upgrading from	older versions of Mason, but will not be
	   supported indefinitely.

   data_cache_defaults
       o   Perl	name:		data_cache_defaults

       o   Apache name:		MasonDataCacheDefaults

       o   Type	in httpd.conf:	hash_list

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Request"

       A hash reference	of default options to use for the "$m->cache" command.
       For example, to use Cache::Cache's "MemoryCache"	implementation by
       default:

	   data_cache_defaults => {cache_class => 'MemoryCache'}

       To use the CHI "FastMmap" driver	by default:

	   data_cache_api      => 'CHI',
	   data_cache_defaults => {driver => 'FastMmap'},

       These settings are overridden by	options	given to particular
       "$m->cache" calls.

   data_dir
       o   Perl	name:		data_dir

       o   Apache name:		MasonDataDir

       o   Type	in httpd.conf:	string

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Interp"

       The data	directory is a writable	directory that Mason uses for various
       features	and optimizations: for example,	component object files and
       data cache files. Mason will create the directory on startup, if
       necessary, and set its permissions according to the web server
       User/Group.

       Under Apache, data_dir defaults to a directory called "mason" under the
       Apache server root. You will need to change this	on certain systems
       that assign a high-level	server root such as /usr!

       In non-Apache environments, data_dir has	no default. If it is left
       unspecified, Mason will not use object files, and the default data
       cache class will	be "MemoryCache" instead of "FileCache".

   decline_dirs
       o   Perl	name:		decline_dirs

       o   Apache name:		MasonDeclineDirs

       o   Type	in httpd.conf:	boolean

       o   Default:		1

       o   Belongs to:		"HTML::Mason::ApacheHandler"

       True or false, default is true. Indicates whether Mason should decline
       directory requests, leaving Apache to serve up a	directory index	or a
       "FORBIDDEN" error as appropriate. See the allowing directory requests
       section of the administrator's manual for more information about
       handling	directories with Mason.

   default_escape_flags
       o   Perl	name:		default_escape_flags

       o   Apache name:		MasonDefaultEscapeFlags

       o   Type	in httpd.conf:	string

       o   Default:		[]

       o   Belongs to:		"HTML::Mason::Compiler"

       Escape flags to apply to	all <% %> expressions by default. The current
       valid flags are

	   h - escape for HTML ('<' => '&lt;', etc.)
	   u - escape for URL (':' => '%3A', etc.)

       The developer can override default escape flags on a per-expression
       basis; see the escaping expressions section of the developer's manual.

       If you want to set multiple flags as the	default, this should be	given
       as a reference to an array of flags.

   define_args_hash
       o   Perl	name:		define_args_hash

       o   Apache name:		MasonDefineArgsHash

       o   Type	in httpd.conf:	string

       o   Default:		auto

       o   Belongs to:		"HTML::Mason::Compiler::ToObject"

       One of "always",	"auto",	or "never".  This determines whether or	not an
       %ARGS hash is created in	components.  If	it is set to "always", one is
       always defined.	If set to "never", it is never defined.

       The default, "auto", will cause the hash	to be defined only if some
       part of the component contains the string "ARGS".  This is somewhat
       crude, and may result in	some false positives, but this is preferable
       to false	negatives.

       Not defining the	args hash means	that we	can avoid copying component
       arguments, which	can save memory	and slightly improve execution speed.

   dhandler_name
       o   Perl	name:		dhandler_name

       o   Apache name:		MasonDhandlerName

       o   Type	in httpd.conf:	string

       o   Default:		dhandler

       o   Belongs to:		"HTML::Mason::Request"

       File name used for dhandlers. Default is	"dhandler".  If	this is	set to
       an empty	string ("") then dhandlers are turned off entirely.

   dynamic_comp_root
       o   Perl	name:		dynamic_comp_root

       o   Apache name:		MasonDynamicCompRoot

       o   Type	in httpd.conf:	boolean

       o   Default:		0

       o   Belongs to:		"HTML::Mason::Interp"

       True or false, defaults to false. Indicates whether the comp_root can
       be modified on this interpreter between requests. Mason can perform a
       few optimizations with a	fixed component	root, so you should only set
       this to true if you actually need it.

   enable_autoflush
       o   Perl	name:		enable_autoflush

       o   Apache name:		MasonEnableAutoflush

       o   Type	in httpd.conf:	boolean

       o   Default:		1

       o   Belongs to:		"HTML::Mason::Compiler"

       True or false, default is true. Indicates whether components are
       compiled	with support for autoflush. The	component can be compiled to a
       more efficient form if it does not have to check	for autoflush mode, so
       you should set this to 0	if you can.

   error_format
       o   Perl	name:		error_format

       o   Apache name:		MasonErrorFormat

       o   Type	in httpd.conf:	string

       o   Default:		Varies

       o   Belongs to:		"HTML::Mason::Request"

       Indicates how errors are	formatted. The built-in	choices	are

       o   brief - just	the error message with no trace	information

       o   text	- a multi-line text format

       o   line	- a single-line	text format, with different pieces of
	   information separated by tabs (useful for log files)

       o   html	- a fancy html format

       The default format under	Apache and CGI is either line or html
       depending on whether the	error mode is fatal or output, respectively.
       The default for standalone mode is text.

       The formats correspond to "HTML::Mason::Exception" methods named
       as_format. You can define your own format by creating an	appropriately
       named method; for example, to define an "xml" format, create a method
       "HTML::Mason::Exception::as_xml"	patterned after	one of the built-in
       methods.

   error_mode
       o   Perl	name:		error_mode

       o   Apache name:		MasonErrorMode

       o   Type	in httpd.conf:	string

       o   Default:		Varies

       o   Belongs to:		"HTML::Mason::Request"

       Indicates how errors are	returned to the	caller.	 The choices are
       fatal, meaning die with the error, and output, meaning output the error
       just like regular output.

       The default under Apache	and CGI	is output, causing the error to	be
       displayed in the	browser.  The default for standalone mode is fatal.

   escape_flags
       o   Perl	name:		escape_flags

       o   Apache name:		MasonEscapeFlags

       o   Type	in httpd.conf:	hash_list

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Interp"

       A hash reference	of escape flags	to set for this	object.	 See the
       section on the set_escape method	for more details.

   ignore_warnings_expr
       o   Perl	name:		ignore_warnings_expr

       o   Apache name:		MasonIgnoreWarningsExpr

       o   Type	in httpd.conf:	regex

       o   Default:		qr/Subroutine .* redefined/i

       o   Belongs to:		"HTML::Mason::Interp"

       Regular expression indicating which warnings to ignore when loading
       components. Any warning that is not ignored will	prevent	the component
       from being loaded and executed. For example:

	   ignore_warnings_expr	=>
	       'Global symbol.*requires	explicit package'

       If set to undef,	all warnings are heeded. If set	to '.',	warnings are
       turned off completely as	a specially optimized case.

       By default, this	is set to 'Subroutine .* redefined'.  This allows you
       to declare global subroutines inside <%once> sections and not receive
       an error	when the component is reloaded.

   in_package
       o   Perl	name:		in_package

       o   Apache name:		MasonInPackage

       o   Type	in httpd.conf:	string

       o   Default:		HTML::Mason::Commands

       o   Belongs to:		"HTML::Mason::Compiler::ToObject"

       This is the package in which a component's code is executed.  For
       historical reasons, this	defaults to "HTML::Mason::Commands".

   interp_class
       o   Perl	name:		interp_class

       o   Apache name:		MasonInterpClass

       o   Type	in httpd.conf:	string

       o   Default:		HTML::Mason::Interp

       o   Belongs to:		"HTML::Mason::ApacheHandler"

       The class to use	when creating a	interpreter. Defaults to
       HTML::Mason::Interp.

   lexer_class
       o   Perl	name:		lexer_class

       o   Apache name:		MasonLexerClass

       o   Type	in httpd.conf:	string

       o   Default:		HTML::Mason::Lexer

       o   Belongs to:		"HTML::Mason::Compiler"

       The class to use	when creating a	lexer. Defaults	to HTML::Mason::Lexer.

   max_recurse
       o   Perl	name:		max_recurse

       o   Apache name:		MasonMaxRecurse

       o   Type	in httpd.conf:	string

       o   Default:		32

       o   Belongs to:		"HTML::Mason::Request"

       The maximum recursion depth for the component stack, for	the request
       stack, and for the inheritance stack. An	error is signalled if the
       maximum is exceeded.  Default is	32.

   named_component_subs
       o   Perl	name:		named_component_subs

       o   Apache name:		MasonNamedComponentSubs

       o   Type	in httpd.conf:	boolean

       o   Default:		0

       o   Belongs to:		"HTML::Mason::Compiler::ToObject"

       When compiling a	component, use uniquely	named subroutines for the a
       component's body, subcomponents,	and methods. Doing this	allows you to
       effectively profile Mason components. Without this, all components
       simply show up as __ANON__ or something similar in the profiler.

   object_file_extension
       o   Perl	name:		object_file_extension

       o   Apache name:		MasonObjectFileExtension

       o   Type	in httpd.conf:	string

       o   Default:		.obj

       o   Belongs to:		"HTML::Mason::Interp"

       Extension to add	to the end of object files. Default is ".obj".

   out_method
       o   Perl	name:		out_method

       o   Apache name:		MasonOutMethod

       o   Type	in httpd.conf:	code

       o   Default:		Print to STDOUT

       o   Belongs to:		"HTML::Mason::Request"

       Indicates where to send output. If out_method is	a reference to a
       scalar, output is appended to the scalar.  If out_method	is a reference
       to a subroutine,	the subroutine is called with each output string. For
       example,	to send	output to a file called	"mason.out":

	   my $fh = new	IO::File ">mason.out";
	   ...
	   out_method => sub { $fh->print($_[0]) }

       By default, out_method prints to	standard output. Under Apache,
       standard	output is redirected to	"$r->print".

   plugins
       o   Perl	name:		plugins

       o   Apache name:		MasonPlugins

       o   Type	in httpd.conf:	list

       o   Default:		[]

       o   Belongs to:		"HTML::Mason::Request"

       An array	of plugins that	will be	called at various stages of request
       processing.  Please see HTML::Mason::Plugin for details.

   postamble
       o   Perl	name:		postamble

       o   Apache name:		MasonPostamble

       o   Type	in httpd.conf:	string

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Compiler::ToObject"

       Text given for this parameter is	placed at the end of each component.
       See also	preamble.  The request will be available as $m in postamble
       code.

   postprocess_perl
       o   Perl	name:		postprocess_perl

       o   Apache name:		MasonPostprocessPerl

       o   Type	in httpd.conf:	code

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Compiler"

       Sub reference that is called to postprocess the Perl portion of a
       compiled	component, just	before it is assembled into its	final
       subroutine form.	 The sub is called with	a single parameter, a scalar
       reference to the	Perl portion of	the component.	The sub	is expected to
       process the string in-place. See	also preprocess	and postprocess_text.

   postprocess_text
       o   Perl	name:		postprocess_text

       o   Apache name:		MasonPostprocessText

       o   Type	in httpd.conf:	code

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Compiler"

       Sub reference that is called to postprocess the text portion of a
       compiled	component, just	before it is assembled into its	final
       subroutine form.	 The sub is called with	a single parameter, a scalar
       reference to the	text portion of	the component.	The sub	is expected to
       process the string in-place. See	also preprocess	and postprocess_perl.

   preamble
       o   Perl	name:		preamble

       o   Apache name:		MasonPreamble

       o   Type	in httpd.conf:	string

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Compiler::ToObject"

       Text given for this parameter is	placed at the beginning	of each
       component, but after the	execution of any "<%once>" block. See also
       postamble. The request will be available	as $m in preamble code.

   preloads
       o   Perl	name:		preloads

       o   Apache name:		MasonPreloads

       o   Type	in httpd.conf:	list

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Interp"

       A list of component paths, optionally with glob wildcards, to load when
       the interpreter initializes. e.g.

	   preloads => ['/foo/index.html','/bar/*.pl']

       Default is the empty list.  For maximum performance, this should	only
       be used for components that are frequently viewed and rarely updated.
       See the preloading components section of	the administrator's manual for
       further details.

       As mentioned in the developer's manual, a component's "<%once>" section
       is executed when	it is loaded.  For preloaded components, this means
       that this section will be executed before a Mason or Apache request
       exist, so preloading a component	that uses $m or	$r in a	"<%once>"
       section will fail.

   preprocess
       o   Perl	name:		preprocess

       o   Apache name:		MasonPreprocess

       o   Type	in httpd.conf:	code

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Compiler"

       Sub reference that is called to preprocess each component before	the
       compiler	does it's magic.  The sub is called with a single parameter, a
       scalar reference	to the script.	The sub	is expected to process the
       script in-place.	  This is one way to extend the	HTML::Mason syntax
       with new	tags, etc., although a much more flexible way is to subclass
       the Lexer or Compiler class. See	also postprocess_text and
       postprocess_perl.

   request_class
       o   Perl	name:		request_class

       o   Apache name:		MasonRequestClass

       o   Type	in httpd.conf:	string

       o   Default:		HTML::Mason::Request

       o   Belongs to:		"HTML::Mason::Interp"

       The class to use	when creating requests.	Defaults to
       HTML::Mason::Request.

   resolver_class
       o   Perl	name:		resolver_class

       o   Apache name:		MasonResolverClass

       o   Type	in httpd.conf:	string

       o   Default:		HTML::Mason::Resolver::File

       o   Belongs to:		"HTML::Mason::Interp"

       The class to use	when creating a	resolver. Defaults to
       HTML::Mason::Resolver::File.

   static_source
       o   Perl	name:		static_source

       o   Apache name:		MasonStaticSource

       o   Type	in httpd.conf:	boolean

       o   Default:		0

       o   Belongs to:		"HTML::Mason::Interp"

       True or false, default is false.	When false, Mason checks the timestamp
       of the component	source file each time the component is used to see if
       it has changed. This provides the instant feedback for source changes
       that is expected	for development.  However it does entail a file	stat
       for each	component executed.

       When true, Mason	assumes	that the component source tree is unchanging:
       it will not check component source files	to determine if	the memory
       cache or	object file has	expired.  This can save	many file stats	per
       request.	However, in order to get Mason to recognize a component	source
       change, you must	flush the memory cache and remove object files.	 See
       static_source_touch_file	for one	easy way to arrange this.

       We recommend turning this mode on in your production sites if possible,
       if performance is of any	concern.

   static_source_touch_file
       o   Perl	name:		static_source_touch_file

       o   Apache name:		MasonStaticSourceTouchFile

       o   Type	in httpd.conf:	string

       o   Default:		None

       o   Belongs to:		"HTML::Mason::Interp"

       Specifies a filename that Mason will check once at the beginning	of of
       every request. When the file timestamp changes, Mason will (1) clear
       its in-memory component cache, and (2) remove object files if they have
       not already been	deleted	by another process.

       This provides a convenient way to implement static_source mode.	All
       you need	to do is make sure that	a single file gets touched whenever
       components change. For Mason's part, checking a single file at the
       beginning of a request is much cheaper than checking every component
       file when static_source=0.

   subcomp_class
       o   Perl	name:		subcomp_class

       o   Apache name:		MasonSubcompClass

       o   Type	in httpd.conf:	string

       o   Default:		HTML::Mason::Component::Subcomponent

       o   Belongs to:		"HTML::Mason::Compiler::ToObject"

       The class into which subcomponent objects are blessed.  This defaults
       to HTML::Mason::Component::Subcomponent.

   use_object_files
       o   Perl	name:		use_object_files

       o   Apache name:		MasonUseObjectFiles

       o   Type	in httpd.conf:	boolean

       o   Default:		1

       o   Belongs to:		"HTML::Mason::Interp"

       True or false, default is true.	Specifies whether Mason	creates	object
       files to	save the results of component parsing. You may want to turn
       off object files	for disk space reasons,	but otherwise this should be
       left alone.

   use_source_line_numbers
       o   Perl	name:		use_source_line_numbers

       o   Apache name:		MasonUseSourceLineNumbers

       o   Type	in httpd.conf:	boolean

       o   Default:		1

       o   Belongs to:		"HTML::Mason::Compiler"

       True or false, default is true. Indicates whether component line
       numbers that appear in error messages, stack traces, etc. are in	terms
       of the source file instead of the object	file. Mason does this by
       inserting '#line' directives into compiled components.  While source
       line numbers are	more immediately helpful, object file line numbers may
       be more appropriate for in-depth	debugging sessions.

   use_strict
       o   Perl	name:		use_strict

       o   Apache name:		MasonUseStrict

       o   Type	in httpd.conf:	boolean

       o   Default:		1

       o   Belongs to:		"HTML::Mason::Compiler::ToObject"

       True or false, default is true. Indicates whether or not	a given
       component should	"use strict".

   use_warnings
       o   Perl	name:		use_warnings

       o   Apache name:		MasonUseWarnings

       o   Type	in httpd.conf:	boolean

       o   Default:		1

       o   Belongs to:		"HTML::Mason::Compiler::ToObject"

       True or false, default is false.	Indicates whether or not a given
       component should	"use warnings".

perl v5.32.0			  2020-05-16		HTML::Mason::Params(3)

NAME | DESCRIPTION | PERL AND APACHE NAMES | PARAMETERS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=HTML::Mason::Params&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help