The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.


__END__
=pod

=head1 NAME

Mason::Manual::Admin - Information for Mason administrators

=head1 SETUP

To serve web requests directly with Mason, use the L<PSGI
plugin|Mason::Plugin::PSGIHandler>.  PSGI integrates with a wide variety of
server backends including mod_perl, FastCGI, CGI, and various Perl-based
servers.

To use Mason as a view in a Catalyst application, use
L<Catalyst::View::Mason2>.

To use Mason from a script or library, use the L<Mason::Interp> API:

    my $interp = Mason->new(
        comp_root => '/path/to/comps',
        data_dir  => '/path/to/data',
        ...
    );
    my $output = $interp->run( '/request/path', foo => 5 )->output();

To try out Mason syntax from the command line, use the L<mason> script:

    % mason
    2 + 2 = <% 2+2 %>
    ^D
    2 + 2 = 4

=head1 LOGGING

Mason uses L<Log::Any|Log::Any> to log various events, such as the start and
end of each request. You can also log to C<Log::Any> from a component with the
C<$m-E<gt>log> method. e.g.

    $m->log->error("Something bad happened!");
    $m->log->debugf("Arguments for '%s' were '%s'", $func, \%args)
        if $m->log->is_debug;

See C<Log::Any::Adapter> for how to direct these logs to an output of your
choice.

=head1 AUTHORS

Jonathan Swartz <swartz@pobox.com>

=head1 SEE ALSO

L<Mason|Mason>

=head1 AUTHOR

Jonathan Swartz <swartz@pobox.com>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Jonathan Swartz.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut