[Catalyst] persistent perl engine

Carl Franks fireartist at gmail.com
Wed Sep 24 12:41:23 BST 2008

I'm just posting this here in case it's useful to anyone else.

`perperl` provided by the PersistentPerl distribution seems to work
fine with myapp_cgi.pl - with one exception...
sysread() seems to always return 0 when running under perperl.

I've created a basic engine that simply overrides read_chunk(), so it
uses read() instead.

This should also work with CGI::SpeedyCGI - which as far as I'm aware,
it the same code as PersistentPerl, under a different name.

Now to start repressing my memory of how long it's taken me to fix this...


package Catalyst::Engine::PerPerl;

use strict;
use base 'Catalyst::Engine::CGI';

sub read_chunk {
    shift; # $self
    shift; # $c

    *STDIN->read( @_ );


More information about the Catalyst mailing list