HTML::Mason::CGIHandler

Use Mason in a CGI environment
Download

HTML::Mason::CGIHandler Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dave Rolsky
  • Publisher web site:
  • http://search.cpan.org/~drolsky/

HTML::Mason::CGIHandler Tags


HTML::Mason::CGIHandler Description

Use Mason in a CGI environment HTML::Mason::CGIHandler is a Perl module to use Mason in a CGI environment.SYNOPSIS In httpd.conf or .htaccess: < LocationMatch ".html$" > Action html-mason /cgi-bin/mason_handler.cgi AddHandler html-mason .html < /LocationMatch > < LocationMatch "^/cgi-bin/" > RemoveHandler .html < /LocationMatch > < FilesMatch "(autohandler|dhandler)$" > Order allow,deny Deny from all < /FilesMatch >A script at /cgi-bin/mason_handler.pl : #!/usr/bin/perl use HTML::Mason::CGIHandler; my $h = HTML::Mason::CGIHandler->new ( data_dir => '/home/jethro/code/mason_data', allow_globals => , ); $h->handle_request;A .html component somewhere in the web server's document root: < %args > $mood => 'satisfied' % $r->err_header_out(Location => "http://blahblahblah.com/moodring/$mood.html"); ...This module lets you execute Mason components in a CGI environment. It lets you keep your top-level components in the web server's document root, using regular component syntax and without worrying about the particular details of invoking Mason on each request.If you want to use Mason components from within a regular CGI script (or any other Perl program, for that matter), then you don't need this module. You can simply follow the directions in the Using Mason from a standalone script section of the administrator's manual.This module also provides an $r request object for use inside components, similar to the Apache request object under HTML::Mason::ApacheHandler, but limited in functionality. Please note that we aim to replicate the mod_perl functionality as closely as possible - if you find differences, do not depend on them to stay different. We may fix them in a future release. Also, if you need some missing functionality in $r, let us know, we might be able to provide it.Finally, this module alters the HTML::Mason::Request object $m to provide direct access to the CGI query, should such access be necessary. Requirements: · Perl


HTML::Mason::CGIHandler Related Software