[cgiapp] mod_perl vs. FastCGI
Michael Peters
mpeters at plusthree.com
Mon Jan 19 14:54:27 EST 2009
fREW Schmidt wrote:
>> However, if that still seems like too long, and your code is too
>> tricky for Apache2::Reload, there are two simple solutions. One is to
>> develop under CGI, which should be easy for most CGI::App users. Then
>> you just switch over to mod_perl when you're ready for testing.
>
> I think I'll do this one. That's definitely reasonable. What about
> the dispatch stuff? Will my URL just look like this:
>
> foo/Dispatch.pm/controller_foo/action
The URL doesn't have to change. But because you aren't using mod_perl you can't have your Dispatch
class act as a PerlResponseHandler in your Location (like you're trying to do in the other thread).
Instead you can create a small index.pl script that uses your Dispatch class and then use something
like mod_rewrite to fix the url so that it actually goes from "/controller_foo/action" to
"/index.pl/controller_foo/action". Then execute the index.cgi under normal CGI when developing, or
under ModPerl::Registry when in production
(http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Registry_Scripts).
--
Michael Peters
Plus Three, LP
More information about the cgiapp
mailing list