Commit | Line | Data |
---|---|---|
111728e3 | 1 | package Catalyst::Engine::Apache::MP19; |
479d2af4 | 2 | |
3 | use strict; | |
316bf0f0 | 4 | use base qw[Catalyst::Engine::Apache::MP19::Base Catalyst::Engine::CGI]; |
479d2af4 | 5 | |
6 | =head1 NAME | |
7 | ||
22a23d06 | 8 | Catalyst::Engine::Apache::MP19 - Catalyst Apache MP19 Engine |
479d2af4 | 9 | |
10 | =head1 SYNOPSIS | |
11 | ||
12 | See L<Catalyst>. | |
13 | ||
14 | =head1 DESCRIPTION | |
15 | ||
06e1b616 | 16 | This is the Catalyst engine specialized for Apache mod_perl version 1.9x. |
479d2af4 | 17 | |
18 | =head1 OVERLOADED METHODS | |
19 | ||
316bf0f0 | 20 | This class overloads some methods from C<Catalyst::Engine::Apache::MP13::Base> |
21 | and C<Catalyst::Engine::CGI>. | |
479d2af4 | 22 | |
23 | =over 4 | |
24 | ||
316bf0f0 | 25 | =item $c->prepare_body |
e7c0c583 | 26 | |
27 | =cut | |
28 | ||
fc88e495 | 29 | sub prepare_body { |
316bf0f0 | 30 | shift->Catalyst::Engine::CGI::prepare_body(@_); |
e7c0c583 | 31 | } |
32 | ||
316bf0f0 | 33 | =item $c->prepare_parameters |
479d2af4 | 34 | |
e7c0c583 | 35 | =cut |
36 | ||
fc88e495 | 37 | sub prepare_parameters { |
316bf0f0 | 38 | shift->Catalyst::Engine::CGI::prepare_parameters(@_); |
e7c0c583 | 39 | } |
40 | ||
316bf0f0 | 41 | =item $c->prepare_request |
329a7e51 | 42 | |
43 | =cut | |
44 | ||
45 | sub prepare_request { | |
316bf0f0 | 46 | my ( $c, $r, @arguments ) = @_; |
fc88e495 | 47 | |
48 | unless ( $ENV{REQUEST_METHOD} ) { | |
49 | ||
50 | $ENV{CONTENT_TYPE} = $r->headers_in->get("Content-Type"); | |
51 | $ENV{CONTENT_LENGTH} = $r->headers_in->get("Content-Length"); | |
52 | $ENV{QUERY_STRING} = $r->args; | |
53 | $ENV{REQUEST_METHOD} = $r->method; | |
54 | ||
55 | my $cleanup = sub { | |
56 | delete( $ENV{$_} ) for qw( CONTENT_TYPE | |
57 | CONTENT_LENGTH | |
58 | QUERY_STRING | |
59 | REQUEST_METHOD ); | |
60 | }; | |
61 | ||
62 | $r->pool->cleanup_register($cleanup); | |
63 | } | |
316bf0f0 | 64 | |
65 | $c->SUPER::prepare_request($r); | |
66 | $c->Catalyst::Engine::CGI::prepare_request( $r, @arguments ); | |
329a7e51 | 67 | } |
68 | ||
e7c0c583 | 69 | =item $c->prepare_uploads |
70 | ||
71 | =cut | |
72 | ||
fc88e495 | 73 | sub prepare_uploads { |
316bf0f0 | 74 | shift->Catalyst::Engine::CGI::prepare_uploads(@_); |
06e1b616 | 75 | } |
76 | ||
479d2af4 | 77 | =back |
78 | ||
79 | =head1 SEE ALSO | |
80 | ||
c2e8e6fa | 81 | L<Catalyst>, L<Catalyst::Engine>, L<Catalyst::Engine::Apache::Base>. |
479d2af4 | 82 | |
83 | =head1 AUTHOR | |
84 | ||
85 | Sebastian Riedel, C<sri@cpan.org> | |
329a7e51 | 86 | Christian Hansen C<ch@ngmedia.com> |
479d2af4 | 87 | |
88 | =head1 COPYRIGHT | |
89 | ||
90 | This program is free software, you can redistribute it and/or modify it under | |
91 | the same terms as Perl itself. | |
92 | ||
93 | =cut | |
94 | ||
95 | 1; |