in reply to Re^3: setting lighttpd/fcgi/perl ?
in thread setting lighttpd/fcgi/perl ?

How do you normally do url-2->method dispatching ?

Usually the web framework I am using will take care of this (Catalyst, CGI::Application, etc). FCGI::Engine is simply about managing FCGI details for you, this kind of stuff is outside of the scope of this module.

I meant if I want to do it ;) ? I'll take a look at the frameworks, but !
I would be using it to flush JSON structures and from time to time some html page and rather do it manually than using framework.

Replies are listed 'Best First'.
Re^5: setting lighttpd/fcgi/perl ?
by stvn (Monsignor) on Feb 04, 2008 at 19:24 UTC

    Well, it all depends on what you want to dispatch off of. If you like the REST-ish URLs, then you might want to dispatch from path_info. If you don't care about URLs, then you can just simply pass in another parameter to dispatch on. I would put all this logic inside the ->handler method and have it call other methods.

    However, all this said, you really should just use a pre-existing tool, it will save you TONS of time in the long run. If size and learning curve is an issue, then I highly recommend CGI::Application. It is much simpler then Catalyst or Jifty, and will give you all the basic things you will need with very little overhead and few dependencies.

    -stvn