Text::MicroMason::ApacheHandler(3) Use MicroMason from mod_perl


In your httpd.conf or equivalent Apache configuration file:

PerlModule Text::MicroMason::ApacheHandler
<Files *.mm>
SetHandler perl-script
PerlHandler Text::MicroMason::ApacheHandler

In your document root or other web-accessible directory:

  <% my $visitor = $r->connection->remote_host(); %>
    Hello there <%= $visitor %>! 
    The time is now <%= localtime() %>.


Caution: This module is new, experimental, and incomplete. Not intended for production use. Interface subject to change. If you're interested in this capability, your feedback would be appreciated.


The following configuration parameters are supported:
    PerlSetVar MicroMasonSyntax HTMLMason

Name of the syntax class that will compile the templates. Defaults to HTMLMason.

    PerlAddVar MicroMasonMixins Safe
    PerlAddVar MicroMasonMixins CatchErrors

List of additional mixin classes to be enabled.

    PerlAddVar MicroMasonAttribs "-AllowGlobals, allow_globals => '$r'"

Allows for any set of attributes to be defined. Mixin names prefaced with a dash can also be included.