line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Egg::Request::CGI; |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Id: CGI.pm 337 2008-05-14 12:30:09Z lushe $ |
6
|
|
|
|
|
|
|
# |
7
|
1
|
|
|
1
|
|
371
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
8
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
9
|
1
|
|
|
1
|
|
1895
|
use CGI; |
|
1
|
|
|
|
|
10223
|
|
|
1
|
|
|
|
|
6
|
|
10
|
1
|
|
|
1
|
|
54
|
use Carp 'croak'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
11
|
1
|
|
|
1
|
|
5
|
use base qw/ Egg::Request::handler /; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
756
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION= '3.01'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _setup_request { |
16
|
0
|
|
|
0
|
|
|
my($class, $e, $c, $g)= @_; |
17
|
0
|
|
0
|
|
|
|
my $conf= $c->{request} || {}; |
18
|
0
|
0
|
0
|
|
|
|
if (my $max= $conf->{POST_MAX} || $ENV{POST_MAX}) { $CGI::POST_MAX= $max } |
|
0
|
|
|
|
|
|
|
19
|
0
|
0
|
|
|
|
|
if (my $dup= $conf->{DISABLE_UPLOADS}) { $CGI::DISABLE_UPLOADS= $dup } |
|
0
|
|
|
|
|
|
|
20
|
0
|
0
|
0
|
|
|
|
if (my $tmp= $conf->{TMPDIR} || $conf->{TEMP_DIR} |
21
|
0
|
|
|
|
|
|
|| $ENV{TMPDIR} || $ENV{TEMP_DIR}) { $CGITempFile::TMPDIRECTORY= $tmp } |
22
|
0
|
|
|
|
|
|
$class->SUPER::_setup_request($e, $c, $g); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
sub new { |
25
|
0
|
|
|
0
|
1
|
|
my($class, $e, $r)= @_; |
26
|
0
|
|
|
|
|
|
my $req= $class->SUPER::new($e, $r); |
27
|
0
|
|
|
|
|
|
$req->r( CGI->new($r) ); |
28
|
|
|
|
|
|
|
# $req->r( Egg::Request::CGI::handler->new($r) ); |
29
|
0
|
|
|
|
|
|
$req; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
sub parameters { |
32
|
0
|
|
0
|
0
|
1
|
|
$_[0]->{parameters} ||= $_[0]->r->Vars; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
package Egg::Request::CGI::handler; |
36
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
110
|
|
37
|
|
|
|
|
|
|
our @ISA= 'CGI'; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Egg::Request::CGI - Request processing by CGI.pm |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
The WEB request is processed by CGI.pm. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This module is loaded by L<Egg::Request>. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
And, Egg::Request::handler is succeeded to. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 HANDLER METHODS |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 new |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Constructor. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 parameters |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
CGI->Vers is relaid. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 SEE ALSO |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
L<Egg::Release>, |
68
|
|
|
|
|
|
|
L<Egg::Request>, |
69
|
|
|
|
|
|
|
L<CGI>, |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 AUTHOR |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Copyright (C) 2008 Bee Flag, Corp. E<lt>L<http://egg.bomcity.com/>E<gt>. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
80
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.6 or, |
81
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=cut |
84
|
|
|
|
|
|
|
|