CGI::Snapp::Plugin::Redirect

A plugin for CGI::Snapp to simplify using HTTP redirects
Download

CGI::Snapp::Plugin::Redirect Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ron Savage
  • Publisher web site:
  • http://search.cpan.org/~rsavage/

CGI::Snapp::Plugin::Redirect Tags


CGI::Snapp::Plugin::Redirect Description

When you 'use' the CGI::Snapp::Plugin::Redirect Perl module in your sub-class of CGI::Snapp (as in the Synopsis), it automatically imports into your sub-class the "redirect($url)" method, to give you a single call to set the HTTP headers for redirection to an external $url. See that method's details below for exactly what effect a call to redirect() has.If you just want to display the results of another run mode within the same application, then CGI::Snapp::Plugin::Forward's forward() method is more suitable.Synopsis package My::App; use parent 'CGI::Snapp'; use CGI::Snapp::Plugin::Redirect; sub cgiapp_prerun { my($self) = @_; if (>) { $self -> redirect('login.html'); } } # End of cgiapp_prerun. sub teardown { my($self) = @_; return $self -> redirect('http://www.example.com/', '301 Moved Permanently'); } # End of teardown.Product's homepage


CGI::Snapp::Plugin::Redirect Related Software