in reply to CGI::Application for complex web applications?

Have a look at CGI::Application::Dispatch. It works pretty much exactly like you describe. It can be used as a mod_perl handler if you use mod_perl, or it can be used in a simple CGI script if you don't use mod_perl.

As for the three questions at the bottom:

Replies are listed 'Best First'.
Re^2: CGI::Application for complex web applications?
by techcode (Hermit) on Jul 28, 2005 at 06:33 UTC
    Thanks for pointing it out to me :)

    I don't know if there is something I'm missing about/on CPAN? Can I simply browse to see all the CGI::Application modules (the folder CGI/Application/ and it's sub-folders)?

    I still have to check if it will work with AutoRunmode plug in as it's not mentioned in the docs. But I did spotted authors words that module is written because he's lazy and didn't wanted to write same code over and over - so there are good chances it will work :)

    Almost forgot - if I want to use several CGI::Application::Plugin(s) - say this AutoRunmode and Sessions - how do I do that?

    Thanks.

      I use CGI::Application::Plugin::AutoRunmode with CGI::Application::Dispatch all the time. They work really well together.

      for most of the plugins, you just have to use them in your module

      package My::App; use base qw(CGI::Application); use CGI::Application::Plugin::AutoRunmode; use CGI::Application::Plugin::Session;

      As for finding all the plugins, since many of the plugins are written by different authors, you can't easily see a list of all of them on one page. Your best bet is just to use search.cpan.org and search for CGI::Application. You will have to page through cause there are quite a few of them. Another way to find them all quickly is to look in the 02packages.details.txt.gz file in your local CPAN directory:

      zcat $HOME/.cpan/modules/02packages.details.txt.gz | grep 'CGI::Applic +ation'

      That will quickly give you a list, although you won't get you much information.

        Thanks cees!

        I don't know how/why but for some reason I was reading "use base 'CGI::Application::Plugin::Session';' instead of just simple "use CGI::Application::Plugin::Session;" on all those plug ins.

        Guess I made it in my mind that those are sub-classes of CGI::App for some strange reason. Probably because Perl's OOP is a bit different on those matters than what they are forcing on university (Java, C# ...).

      I don't know if there is something I'm missing about/on CPAN? Can I simply browse to see all the CGI::Application modules (the folder CGI/Application/ and it's sub-folders)?
      You can browse the directory structure for CGI::Application *, but that only shows the modules that are in the default C::A install. There are several extensions on CPAN that you need to install seperately.

      Just use search.cpan.org to search for related modules that are not in the default distribution.

      * update: you can also walk the "modules by name" list on cpan, but IMO search.cpan.org is a lot easier to use.