[Rt-commit] r3531 - in HTTP-Server-Simple-Mason: ex
lib/HTTP/Server/Simple
glasser at bestpractical.com
glasser at bestpractical.com
Mon Jul 25 15:51:48 EDT 2005
Author: glasser
Date: Mon Jul 25 15:51:48 2005
New Revision: 3531
Modified:
HTTP-Server-Simple-Mason/ex/sample_server.pl
HTTP-Server-Simple-Mason/lib/HTTP/Server/Simple/Mason.pm
Log:
Fix documentation to refer to mason_config, not handler_config.
Jesse, I'd recommend rolling a release from this. (I bumped the version
number in the module but did no other releng work.)
Modified: HTTP-Server-Simple-Mason/ex/sample_server.pl
==============================================================================
--- HTTP-Server-Simple-Mason/ex/sample_server.pl (original)
+++ HTTP-Server-Simple-Mason/ex/sample_server.pl Mon Jul 25 15:51:48 2005
@@ -9,9 +9,8 @@
package MyApp::Server;
use base qw/HTTP::Server::Simple::Mason/;
-sub handler_config {
- my $self = shift;
- return ( $self->SUPER::handler_config, comp_root => '/tmp/mason-pages' );
+sub mason_config {
+ return ( comp_root => '/tmp/mason-pages' );
}
1;
Modified: HTTP-Server-Simple-Mason/lib/HTTP/Server/Simple/Mason.pm
==============================================================================
--- HTTP-Server-Simple-Mason/lib/HTTP/Server/Simple/Mason.pm (original)
+++ HTTP-Server-Simple-Mason/lib/HTTP/Server/Simple/Mason.pm Mon Jul 25 15:51:48 2005
@@ -1,18 +1,13 @@
package HTTP::Server::Simple::Mason;
use base qw/HTTP::Server::Simple::CGI/;
use strict;
-our $VERSION = '0.05';
+our $VERSION = '0.06';
=head1 NAME
HTTP::Server::Simple::Mason - An abstract baseclass for a standalone mason server
-=head1 VERSION
-
-This document describes HTTP::Server:Simple::Mason version 0.02
-
-
=head1 SYNOPSIS
@@ -23,13 +18,10 @@
package MyApp::Server;
use base qw/HTTP::Server::Simple::Mason/;
- sub handler_config {
- my $self = shift;
- return ( $self->SUPER::handler_config, comp_root => '/tmp/mason-pages' );
+ sub mason_config {
+ return ( comp_root => '/tmp/mason-pages' );
}
- 1;
-
=head1 DESCRIPTION
@@ -167,7 +159,8 @@
=head2 mason_config
-Subclass-defined mason handler configuration
+Returns a subclass-defined mason handler configuration; you almost certainly want to override it
+and specify at least C<comp_root>.
=cut
@@ -177,7 +170,7 @@
=head2 default_mason_config
-Default mason handler configuration
+Returns the default mason handler configuration (which can be overridden by entries in C<mason_config>).
=cut
@@ -242,11 +235,12 @@
For most configuration, see L<HTTP::Server::Simple>.
You can (and must) configure your mason CGI handler by subclassing this module and overriding
-the subroutine 'handler_config'. It's most important that you set a component root (where your pages live)
+the subroutine C<mason_config>. It's most important that you set a component root (where your pages live)
by adding
comp_root => '/some/absolute/path'
+See the Synopsis section or C<ex/sample_server.pl> in the distribution for a complete example.
=head1 DEPENDENCIES
More information about the Rt-commit
mailing list