[Catalyst] Engine/FastCGI.pm failure under Win32

Sam Vilain sam at vilain.net
Thu Dec 1 22:28:47 CET 2005


On Thu, 2005-12-01 at 15:26 +0000, Carl Franks wrote:
> Is it really necessary for Engine/FastCGI.pm to check STDIN is a socket?

It's a useful sanity check and recommended by the FastCGI standard.  A
shame that your system fails to implement the basic features required
for sane operation!

> The check fails for me, meaning I can't run myapp_fastcgi.pl under
> apache I've attached a patch which removes that check.

I suggest reformatting your patch to wrap the blocks that don't work
with ($^O eq "Win32") etc.  Or, preferably, find out how you check on
Win32 that it *is* actually being called in a FastCGI context, and
refuse to run otherwise.  Porting beats regression in my books.

Note that you'll need to do more porting work if you want to use the
daemonize functionality for external use.  I guess the equivalent
functionality on Win32 is called being a "service"; but I've got no idea
what hoops you have to jump through to do that.

> The advantage of this is you can now can run `perl
> script/myapp_fastcgi.pl` and see the output, just like you can for
> myapp_cgi.pl

Out of interest, why do you care when you can just run the CGI handler
instead?

Sam.




More information about the Catalyst mailing list