FastCGi on IIS... The tale of Microsoft and my new Perl Module...

Andy Armstrong n at
Fri Oct 19 14:43:50 BST 2007

On 19 Oct 2007, at 13:55, Lyle - wrote:
> Andy Armstrong wrote:
>> On 19 Oct 2007, at 02:39, Lyle - wrote:
>>> I'm interested in any feedback...
>> It looks as if you're loading and compiling the script every time.  
>> Which seems to negate some of the advantages of FastCGI. You don't  
>> get a clean execution environment anyway because you're just  
>> running code in the same scope over and over again.
>  From looking at the forums, people wanted a solution where  
> they could use MS new FastCGI DLL in much the same way PHP is. Yes  
> the scripts code is compiled each time, but Perl is already loaded  
> and the process re-used. It's not intended to give you all of  
> FastCGI's benefits, just some of them, it's supposed to be a drop  
> in replacement for their CGI.
>  Thanks for pointing out the clean execution environment, this will  
> cause a problem for global variables in the script... I'd  
> appreciate it if someone would point out the fastest way of giving  
> each call a clean environment, so that globals from scripts called  
> in this manor are not left behind...

Spawn a new process - but then you've lost the advantage of FastCGI  
and have basically reinvented a slower CGI. I don't think you can  
really hide the fact that the process is persistent - better to  
embrace it.

>> And no tests! :)
> My bad, but with such as small script, what would you test for?

Everything! Test that it does every single thing it's supposed to do.  
Test the POD for coverage and formatting too.

Andy Armstrong, Hexten

More information about the mailing list