Egg::Plugin::Redirect::Page - The page for for Egg ..redirecting.. is displayed.


  package MYPROJECT;
  use strict;
  use Egg qw/Redirect::Page/;

Example of code.

  # It puts out and it informs of alert of the Java script before
  # the page is switched.
  $e->redirect_page('/complete/ok', 'Processing was completed.', alert=> 1 );


This module sets the page and HTML for the switch is set in $e->response->body.

Set HTML can customize the design by the setting in the simple one including <meta http-equiv="refresh" ...>.


This module is set by the page item of 'plugin_redirect'.

    plugin_redirect=> {
      page=> {

* 'Content-Language' and 'Content-Type' succeed the setting of the main.


Style setting of body.

Default is 'background:#FFEDBB; text-align:center;'.


Style setting of enclosure of the entire page.

Default is 'background:#FFF7ED; padding:10px; margin:50px; font:normal 12px sans-serif; border:#D15C24 solid 3px; text-align:left;'.


Style setting in message part displayed on screen.

Default is 'font:bold 20px sans-serif; margin:0px; margin-left:0px;'.


Default when page switch previous URL is not specified.

Default is '/'.


Waiting time until page is switched.

Default is 0.


Default when message displayed on screen is not passed.

Default is 'Processing was completed.'.


redirect_page_html ([REDIRECT_URL], [MESSAGE], [OPTION]);

The HTML source for page switch is returned.

When [REDIRECT_URL] is omitted, a set value of default_url is used.

When [MESSAGE] is omitted, a set value of default_msg is used.

Some settings can be overwrited by [OPTION].

List of option.

  wait        ... Waiting time until page switching.
  alert       ... Alert of the Java script is displayed before the page is switched.
  onload_func ... Script to want to execute when page is displayed.
  body_style  ... Style of body. 
  div_style   ... Enclosure style on the entire page.
  h1_style    ... Style of message display part.

redirect_page or response->redirect_page ([REDIRECT_URL], [MESSAGE], [OPTION]);

The HTML source obtained from A is set in $e->response->body. And, 200 is set in $e->response->status.




Masatoshi Mizuno <>


Copyright (C) 2007 by Bee Flag, Corp. <>, All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.