Egg::Engine - Base class for Egg::Engin::*.
This module is a base class for the engine.
Anything cannot be done in the unit.
Prior of each component is prepared.
The following thing is concretely done.
1 ... Call of $e->request->prepare 2 ... prepare of effective each MODEL is called. 3 ... prepare of effective each VIEW is called. 4 ... prepare of each plugin is called. 5 ... Generation of dispatch object.
This method will be called from Egg::Engine::*.
It processes it to the WEB request.
The following things are concretely done.
1 ... The project object is generated. 2 ... start_engine of Egg::Engine::* is called. 3 ... response->result is returned and processing is completed.
Processing moves as follows when the error occurs.
1 ... Acquisition of error message 2 ... finalize_error is called. 3 ... The log is output. 4 ... Making of error screen. 5 ... response->result is returned and processing is completed.
The end of processing is told.
As a result, some processing is canceled.
Please give the argument the HTTP response code.
* The response code is set in response->status.
* 0 Resets response->status when giving it.
$e->finished(404); ## NOT_FOUND
* It is good to use Egg::Const if the response code is not understood easily.
use Egg::Const; $e->finished( NOT_FOUND );
The error screen is made.
The message is output to STDERR.
When debug mode is turning off, nothing is done.
response->The data output to body is output to the client.
* If finished is true, it has already canceled.
* If redirect is true, processing is divided. The content here might change in the future. However, I will have interchangeability.
The log object is returned.
The error message is accepted.
The error defined to omit messaging is returned by the ARRAY reference.
0 returns in case of undefined.
It escapes in the HTML tag.
* HTML::Entities is used.
Ailias is 'escape_html' and 'eHTML'.
The HTML tag where it is escaped is restored.
Ailias is 'unescape_html' and 'ueHTML'.
The figure is made an escape object.
URI is encoded.
Ailias is 'escape_uri' and 'eURI'.
* URI::Escape is used.
The URI decipherment is done.
Ailias is 'unescape_uri' and 'ueURI'.
Unicode also encodes URI to the object.
The object of URI is returned.
When [ARGS] is passed, URI->query_form is done.
my $uri= $e->uri_to( 'http://domain/path/', { param1 => 'fooo', param2 => 'baaa', }); print $uri;
URI URI::Escape, HTML::Entities, Egg::Engine::V1, Egg::Exception Egg::Release,
Masatoshi Mizuno, <lushe@cpan.org>
Copyright (C) 2007 Bee Flag, Corp. <http://egg.bomcity.com/>, 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.
To install Egg::Release, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Release
CPAN shell
perl -MCPAN -e shell install Egg::Release
For more information on module installation, please visit the detailed CPAN module installation guide.