NAME
CGI::WPM::Base - Demo of HTML::Application that is subclassed by 7 other demos.
DEPENDENCIES
Perl Version
5.004
Standard Modules
I<none>
Nonstandard Modules
HTML::Application 0.4
SYNOPSIS
What are the subclasses of this:
CGI::WPM::GuestBook, CGI::WPM::MailForm, CGI::WPM::MultiPage, CGI::WPM::Redirect, CGI::WPM::SegTextDoc, CGI::WPM::Static, and CGI::WPM::Usage.
How you pass extra Globals-type info to subclasses of this that need it:
# Note that $globals is an HTML::Application object.
# Code like this goes in your startup shell.
my $site_extras = $globals->get_misc_objects_ref();
$site_extras->{smtp_host} = 'mail.aardvark.net'; # defaults to 'localhost'
$site_extras->{smtp_timeout} = 30; # that's also the default
$site_extras->{site_title} = 'Aardvark On The Range';
$site_extras->{owner_name} = 'Tony Simons';
$site_extras->{owner_email} = 'tony@aardvark.net';
$site_extras->{owner_em_vrp} = '/contact/us';
# And below that you can call_component() on subclasses.
# The above global-type settings complement the "preferences" below and
# in the subclasses, but for these mods they don't live in the preferences.
DESCRIPTION
This Perl 5 object class is part of a demonstration of HTML::Application in use. It is one of a set of "application components" that takes its settings and user input through HTML::Application and uses that class to send its user output. This demo module set can be used together to implement a web site complete with static html pages, e-mail forms, guest books, segmented text document display, usage tracking, and url-forwarding. Of course, true to the intent of HTML::Application, each of the modules in this demo set can be used independantly of the others.
SYNTAX
This class does not export any functions or methods, so you need to call them using object notation. This means using Class->function() for functions and $object->method() for methods. If you are inheriting this class for your own modules, then that often means something like $self->method().
PUBLIC FUNCTIONS AND METHODS
main( GLOBALS )
You invoke this method to run the application component that is encapsulated by this class. The required argument GLOBALS is an HTML::Application object that you have previously configured to hold the instance settings and user input for this class. When this method returns then the encapsulated application will have finished and you can get its user output from the HTML::Application object.
PREFERENCES HANDLED BY THIS MODULE
This POD is coming when I get the time to write it.
amend_msg # personalized html appears on error page instead of subc action
page_body # if defined, no subclass is used and this literal used instead
page_header # content goes above our subclass's
page_footer # content goes below our subclass's
page_title # title for this document
page_author # author for this document
page_meta # meta tags for this document
page_css_src # stylesheet urls to link in
page_css_code # css code to embed in head
page_body_attr # params to put in <BODY>
page_replace # replacements to perform
METHOD TO OVERRIDE BY SUBCLASSES
main_dispatch() -- their version of main(), which is handled in Base
PRIVATE METHODS FOR USE BY SUBCLASSES
This POD is coming when I get the time to write it.
_set_to_init_error_page()
_get_amendment_message()
_smtp_host()
_smtp_timeout()
_site_title()
_site_owner_name()
_site_owner_email()
_site_owner_email_vrp()
_site_owner_email_html()
AUTHOR
Copyright (c) 1999-2001, Darren R. Duncan. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. However, I do request that this copyright information remain attached to the file. If you modify this module and redistribute a changed version then please attach a note listing the modifications.
I am always interested in knowing how my work helps others, so if you put this module to use in any of your own code then please send me the URL. Also, if you make modifications to the module because it doesn't work the way you need, please send me a copy so that I can roll desirable changes into the main release.
Address comments, suggestions, and bug reports to perl@DarrenDuncan.net.
SEE ALSO
perl(1), HTML::Application, CGI::WPM::GuestBook, CGI::WPM::MailForm, CGI::WPM::MultiPage, CGI::WPM::Redirect, CGI::WPM::SegTextDoc, CGI::WPM::Static, and CGI::WPM::Usage.