package Catalyst::Engine::HTTP;
-use Class::C3;
use Moose;
extends 'Catalyst::Engine::CGI';
-no Moose;
use Data::Dump qw(dump);
use Errno 'EWOULDBLOCK';
=cut
-sub finalize_read {
+before finalize_read => sub {
# Never ever remove this, it would result in random length output
# streams if STDIN eq STDOUT (like in the HTTP engine)
*STDIN->blocking(1);
- shift->next::method(@_);
-}
+};
=head2 $self->prepare_read($c)
=cut
-sub prepare_read {
+before prepare_read => sub {
# Set the input handle to non-blocking
*STDIN->blocking(0);
- shift->next::method(@_);
-}
+};
=head2 $self->read_chunk($c, $buffer, $length)
=cut
-sub write {
+around write => sub {
+ my $orig = shift;
my ( $self, $c, $buffer ) = @_;
# Avoid 'print() on closed filehandle Remote' warnings when using IE
$buffer = $headers . $buffer;
}
- my $ret = $self->next::method($c, $buffer);
+ my $ret = $self->$orig($c, $buffer);
if ( !defined $ret ) {
$self->{_write_error} = $!;
}
return $ret;
-}
+};
=head2 run
sub _inet_addr { unpack "N*", inet_aton( $_[0] ) }
+no Moose;
+
=head1 SEE ALSO
-L<Catalyst>, L<Catalyst::Engine>.
+L<Catalyst>, L<Catalyst::Engine>
=head1 AUTHORS
-Sebastian Riedel, <sri@cpan.org>
-
-Dan Kubb, <dan.kubb-cpan@onautopilot.com>
-
-Sascha Kiefer, <esskar@cpan.org>
-
-Andy Grundman, <andy@hybridized.org>
+Catalyst Contributors, see Catalyst.pm
=head1 THANKS