NAME
CGI::WPM::Redirect - Perl module that is a subclass of CGI::WPM::Base and issues an HTTP redirection header.
DEPENDENCIES
Perl Version
5.004
Standard Modules
I<none>
Nonstandard Modules
CGI::WPM::Base 0.3
CGI::WPM::Globals 0.3
SYNOPSIS
Redirect To A Custom Url
require CGI::WPM::Globals;
my $globals = CGI::WPM::Globals->new();
require CGI::WPM::Redirect;
$globals->move_site_prefs( {} ); # looks at query parameter "url"
CGI::WPM::Redirect->execute( $globals );
$globals->send_to_user(); # sends a 301 Moved header
Always Redirect To Same Url
$globals->move_site_prefs( {url => 'http://www.samplesitenew.net'} );
DESCRIPTION
This POD is coming when I get the time to write it.
This module sets the redirect_url() property of the WebUserIO object that Globals inherits from, and the latter does the actual work; you could do this directly if you wished. This Redirect module will spit out an ordinary HTML page if it doesn't know what url to forward to. It is intended to be used in larger web sites that want to track outgoing visitors with the same program that makes the site's pages.
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.
url # preferences can say where we redirect to
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::WebUserIO.