| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Catalyst::Engine::Zeus; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
729
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
34
|
|
|
4
|
1
|
|
|
1
|
|
4
|
use base qw[Catalyst::Engine::Zeus::Base Catalyst::Engine::CGI]; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
547
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Catalyst::Engine::Zeus - Catalyst Zeus Engine |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
See L<Catalyst>. |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
This is the Catalyst engine specialized for Zeus Web Server V4. |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 OVERLOADED METHODS |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
This class overloads some methods from C<Catalyst::Engine::Zeus::Base> and |
|
23
|
|
|
|
|
|
|
C<Catalyst::Engine::CGI>. |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=over 4 |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=item $c->prepare_body |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub prepare_body { |
|
32
|
|
|
|
|
|
|
shift->Catalyst::Engine::CGI::prepare_body(@_); |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=item $c->prepare_parameters |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=cut |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub prepare_parameters { |
|
40
|
|
|
|
|
|
|
shift->Catalyst::Engine::CGI::prepare_parameters(@_); |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item $c->prepare_request($r) |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub prepare_request { |
|
48
|
|
|
|
|
|
|
my ( $c, $r, @arguments ) = @_; |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
unless ( $ENV{REQUEST_METHOD} ) { |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
$ENV{CONTENT_TYPE} = $r->header_in("Content-Type"); |
|
53
|
|
|
|
|
|
|
$ENV{CONTENT_LENGTH} = $r->header_in("Content-Length"); |
|
54
|
|
|
|
|
|
|
$ENV{QUERY_STRING} = $r->args; |
|
55
|
|
|
|
|
|
|
$ENV{REQUEST_METHOD} = $r->method; |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
my $cleanup = sub { |
|
58
|
|
|
|
|
|
|
delete( $ENV{$_} ) for qw( CONTENT_TYPE |
|
59
|
|
|
|
|
|
|
CONTENT_LENGTH |
|
60
|
|
|
|
|
|
|
QUERY_STRING |
|
61
|
|
|
|
|
|
|
REQUEST_METHOD ); |
|
62
|
|
|
|
|
|
|
}; |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
$r->register_cleanup($cleanup); |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
$r->register_cleanup(\&CGI::_reset_globals); |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
$c->SUPER::prepare_request($r); |
|
70
|
|
|
|
|
|
|
$c->Catalyst::Engine::CGI::prepare_request(@arguments); |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item $c->prepare_uploads |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub prepare_uploads { |
|
78
|
|
|
|
|
|
|
shift->Catalyst::Engine::CGI::prepare_uploads(@_); |
|
79
|
|
|
|
|
|
|
} |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=back |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 BUGS |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
There is a bug in C<Zeus::ModPerl::Request> that keeps us from using it so we are |
|
86
|
|
|
|
|
|
|
currently reverting back to C<CGI> for params and uploads. |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L<Catalyst> L<Catalyst::Engine::Zeus::Base>, L<Catalyst::Engine::CGI>. |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Christian Hansen C<ch@ngmedia.com> |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This program is free software, you can redistribute it and/or modify it under |
|
99
|
|
|
|
|
|
|
the same terms as Perl itself. |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=cut |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
1; |