package Catalyst::Engine::CGI;
-use Class::C3;
use Moose;
extends 'Catalyst::Engine';
has env => (is => 'rw');
-no Moose;
-
=head1 NAME
Catalyst::Engine::CGI - The CGI Engine
=cut
-sub prepare_query_parameters {
+around prepare_query_parameters => sub {
+ my $orig = shift;
my ( $self, $c ) = @_;
local (*ENV) = $self->env || \%ENV;
if ( $ENV{QUERY_STRING} ) {
- $self->next::method( $c, $ENV{QUERY_STRING} );
+ $self->$orig( $c, $ENV{QUERY_STRING} );
}
-}
+};
=head2 $self->prepare_request($c, (env => \%env))
=cut
-sub prepare_write {
+around prepare_write => sub {
*STDOUT->autoflush(1);
- return shift->next::method(@_);
-}
+ return shift->(@_);
+};
=head2 $self->write($c, $buffer)
=cut
-sub write {
+around write => sub {
+ my $orig = shift;
my ( $self, $c, $buffer ) = @_;
# Prepend the headers if they have not yet been sent
$buffer = $headers . $buffer;
}
- return $self->next::method( $c, $buffer );
-}
+ return $self->$orig( $c, $buffer );
+};
=head2 $self->read_chunk($c, $buffer, $length)
=head1 SEE ALSO
-L<Catalyst> L<Catalyst::Engine>.
+L<Catalyst>, L<Catalyst::Engine>
=head1 AUTHORS
-Sebastian Riedel, <sri@cpan.org>
-
-Christian Hansen, <ch@ngmedia.com>
-
-Andy Grundman, <andy@hybridized.org>
+Catalyst Contributors, see Catalyst.pm
=head1 COPYRIGHT
the same terms as Perl itself.
=cut
+no Moose;
1;