Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: CGI::Application musings

by ihb (Deacon)
on May 30, 2005 at 00:36 UTC ( [id://461619] : note . print w/replies, xml ) Need Help??

in reply to CGI::Application musings

Have you checked out CGI::Application::Dispatch? It seems like that's the feature you want.


See perltoc if you don't know which perldoc to read!

Replies are listed 'Best First'.
Re^2: CGI::Application musings
by cees (Curate) on May 30, 2005 at 02:03 UTC

    I don't think that CGI::Application::Dispatch will help in this situation. The op is trying to avoid having to fill out the $self->run_modes() hash and CGI::Application::Dispatch will not help to solve that. However, since the op is motivated by lazyness, CGI::Application::Dispatch is definately something that should be looked into!

    CGI::Application::Dispatch helps when you have several CGI::Application modules, and you are tired of writing stub CGI scripts to launch all the modules. It allows you to lauch multiple CGI::Application modules from a single CGI script (or mod_perl handler) by using the PATH_INFO of the URL.

    Update: I just re-read the question, and it looks like your suggestion is a good one. I missed the part of the code where the runmodes from a whole bunch of modules where loaded into the main CGI::Application module. Sorry for the confusion.