NAME
CGI::WPM::SegTextDoc - Perl module that is a subclass of CGI::WPM::Base and displays a static text page, which can be in multiple segments.
DEPENDENCIES
Perl Version
5.004
Standard Modules
I<none>
Nonstandard Modules
CGI::WPM::Base 0.3
CGI::WPM::Globals 0.3
CGI::WPM::Static 0.3
SYNOPSIS
Display A Text File In Multiple Segments
require CGI::WPM::Globals;
my $globals = CGI::WPM::Globals->new( "/path/to/site/files" );
$globals->user_vrp( lc( $globals->user_input_param( # fetch extra path info...
$globals->vrp_param_name( 'path' ) ) ) ); # to know what page user wants
$globals->current_user_vrp_level( 1 ); # get ready to examine start of vrp
require CGI::WPM::Static;
$globals->move_site_prefs( {
title => 'Index of the World',
author => 'Jules Verne',
created => 'Version 1.0, first created 1993 June 24',
updated => 'Version 3.1, last modified 2000 November 18',
filename => 'jv_world.txt',
segments => 24,
} );
CGI::WPM::Static->execute( $globals ); # content-type: text/html
$globals->send_to_user();
You need to have a subdirectory named "jv_world" that contains the 24 files that correspond to the segments, named "jv_world_001.txt" through "...024.txt".
Display A Text File All On One Page
$globals->move_site_prefs( {
title => 'Pizza Joints In New York',
author => 'Oscar Wilder',
created => 'Version 0.5, first created 1997 February 17',
updated => 'Version 1.2, last modified 1998 March 8',
filename => 'ow_pizza.txt',
segments => 1, # also the default
} );
You need to have a single file named "ow_pizza.txt", not in a subdirectory.
DESCRIPTION
This POD is coming when I get the time to write it.
When the file is in multiple segments, a subdirectory is used to hold the pieces. When the file is in one part, there is no subdirectory. Multipart documents have a navigation bar automatically generated to go between them. Documents are assumed to be plain text, and are HTML escaped.
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.
title # title of the document
author # who made the document
created # date and number of first version
updated # date and number of newest version
filename # common part of filename for pieces
segments # number of pieces doc is in
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, CGI::WPM::Static.