HTTP::Server::Simple::Mason

HTTP::Server::Simple::Mason is an abstract baseclass for a standalone mason server.
Download

HTTP::Server::Simple::Mason Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jesse Vincent
  • Publisher web site:
  • http://search.cpan.org/~jesse/

HTTP::Server::Simple::Mason Tags


HTTP::Server::Simple::Mason Description

HTTP::Server::Simple::Mason is an abstract baseclass for a standalone mason server. HTTP::Server::Simple::Mason is an abstract baseclass for a standalone mason server.SYNOPSIS my $server = MyApp::Server->new(); $server->run; package MyApp::Server; use base qw/HTTP::Server::Simple::Mason/; sub mason_config { return ( comp_root => '/tmp/mason-pages' ); }INTERFACESee HTTP::Server::Simple and the documentation below.mason_handlerReturns the server's HTML::Mason::CGIHandler object. The first time this method is called, it creates a new handler by calling new_handler.handle_request CGICalled with a CGI object. Invokes mason and runs the requesthandle_error ERRORIf the call to handle_request dies, handle_error is called with the exception (that is, $@). By default, it does nothing; it can be overriden by your subclass.new_handlerCreates and returns a new HTML::Mason::CGIHandler, with configuration specified by the default_mason_config and mason_config methods. You don't need to call this method yourself; mason_handler will automatically call it the first time it is called.handler_classReturns the name of the Mason handler class invoked in new_handler. Defaults to HTML::Mason::CGIHandler, but in your subclass you may wish to change it to a subclass of HTML::Mason::CGIHandler.setup_escapes $handlerSets up the Mason escapes for the handler $handler. For example, the h in < % $name | h % >By default, sets h to HTTP::Server::Simple::Mason::escape_utf8 and u to HTTP::Server::Simple::Mason::escape_uri, but you can override this in your subclass.mason_configReturns a subclass-defined mason handler configuration; you almost certainly want to override it and specify at least comp_root.default_mason_configReturns the default mason handler configuration (which can be overridden by entries in mason_config).escape_utf8 SCALARREFdoes a css-busting but minimalist escaping of whatever html you're passing in.escape_uri SCALARREFEscapes URI component according to RFC2396 Requirements: · Perl · HTTP::Server::Simple · HTML::Mason


HTTP::Server::Simple::Mason Related Software