Egg::Request - Exclusive module of WEB request processing.
# Access from Egg to this object. $e->request or $e->res; # get query. my $param= $request->params; my $foo= $param->{foo}; or my $foo= $request->param('foo'); # get cookie string. my $cookie= $request->cookie([COOKIE NAME]); or my $cookie= $request->cookies->{[COOKIE NAME]}; and my $foge= $cookie->value; # get request path # * / enters the head without fail. my $path= $request->path; etc..
Query parameters are united by the character-code set with $e->config->{character_in}.
If $e->config->{character_in} is undefined, it treats as 'euc'.
Accessor to object for Request processing.
Request query is returned by the HAHS reference.
Request query is returned. does general operation.
It tries to make $e->snip.
example of dispatch.
$e->request->create_snip( $e->request->param('path') ); my $dir= $e->snip->[0] || return qw{ Root }; ... ban, ban, ban.
It becomes true at the request to SSL or Port 443.
Scheme of URL is returned. http or https
request path is returned. '/' enters the head without fail.
scalar object of cookie is restored.
In addition, when the value is taken out, value is used.
HASH reference of Cookie is returned.
It moves like wrapper to the methods such as $request->uri and $request->user_agent.
It is scheduled to change to HTTP::Headers->header here.
Request uri assembled by the URI module is returned.
$ENV{REMOTE_ADDR} is returned.
$ENV{QUERY_STRING} is returned.
$ENV{HTTP_USER_AGENT} is returned.
$ENV{SERVER_PROTOCOL} is returned.
$ENV{REMOTE_USER} is returned.
$ENV{REQUEST_METHOD} is returned.
$ENV{SERVER_PORT} is returned.
$ENV{SERVER_NAME} is returned.
$ENV{REQUEST_URI} is returned.
$ENV{PATH_INFO} is returned.
$ENV{HTTPS} is returned.
$ENV{HTTP_REFERER} is returned.
$ENV{HTTP_ACCEPT_ENCODING} is returned.
$ENV{HTTP_HOST} or $ENV{SERVER_NAME} is returned.
Host name of the WEB server is returned.
$ENV{REMOTE_HOST} is returned.
When hostname_lookup is off, acquisition is tried by gethostbyaddr().
CGI::Cookie, Egg::Response Egg::Release
Masatoshi Mizuno, <mizuno@bomcity.com>
Copyright (C) 2006 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.