NAME
CGI::WPM::Static - Perl module that is a subclass of CGI::WPM::Base and displays a static HTML page.
DEPENDENCIES
Perl Version
5.004
Standard Modules
I<none>
Nonstandard Modules
CGI::WPM::Base 0.3
CGI::WPM::Globals 0.3
SYNOPSIS
Display An HTML File
require CGI::WPM::Globals;
my $globals = CGI::WPM::Globals->new( "/path/to/site/files" );
require CGI::WPM::Static;
$globals->move_site_prefs( {filename => 'intro.html'} );
CGI::WPM::Static->execute( $globals ); # content-type: text/html
$globals->send_to_user();
Display A Plain Text File -- HTML Escaped
$globals->move_site_prefs( {filename => 'mycode.txt', is_text => 1} );
DESCRIPTION
This POD is coming when I get the time to write it.
Obviously, static files would be better served with a normal web server, but this module addresses such a trivial case for when they are embedded in sites with dynamic content, including when you want to embed plain text in HTML. Also, you can now do search-and-replace in the otherwise static text.
SYNTAX
This class does not export any functions or methods, so you need to call them using indirect notation. This means using Class->function() for functions and $object->method() for methods.
PUBLIC FUNCTIONS AND METHODS
This module inherits its entire public interface from CGI::WPM::Base. Please see the POD for that module so you know how to call this one.
PREFERENCES HANDLED BY THIS MODULE
This POD is coming when I get the time to write it.
filename # name of file we will open
is_text # true if file is not html, but text
AUTHOR
Copyright (c) 1999-2000, 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), CGI::WPM::Base, CGI::WPM::Globals.