Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: setting lighttpd/fcgi/perl ?

by rootcho (Pilgrim)
on Feb 04, 2008 at 19:12 UTC ( [id://666051]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://666051]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-24 08:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found