[Catalyst] Run Perl scripts

Andy Grundman andy at hybridized.org
Wed Sep 14 17:01:20 CEST 2005


Danh Nguyen wrote:
> Thanks for all your help. I have this stupid question - you will laugh 
> at it, i am sure. But as a new person in perl, and all, I just want to ask:
> - Can I run a myscript.pl  or myscript.cgi when I have it in the root 
> dir of MyApp (which running on the built-in http, in windows Xp environment)
> Please elaborate your instruction.

No, Catalyst won't run CGI scripts.  If you did this while running 
Static::Simple you'll probably just get the text output to the browser.

There is no way to do this with the built-in server, you'll need Apache.
Something like this maybe:

# your Cat app:
<Perl>
   use lib qw(/path/to/MyApp/lib);
</Perl>

PerlModule MyApp

<Location />
   SetHandler modperl
   PerlResponseHandler MyApp
</Location>

<Location /cgi-bin>
   SetHandler default
   Options +ExecCGI
</Location>

-Andy



More information about the Catalyst mailing list