Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: RFC: Apache::Controller

by hardburn (Abbot)
on Dec 03, 2004 at 05:03 UTC ( #412045=note: print w/ replies, xml ) Need Help??


in reply to RFC: Apache::Controller

If you're aiming for using such a beast directly as an Apache handler, you could say:

package My::App; use base 'CGI::Application'; sub handler { my $r = shift; __PACKAGE__->new->run; } # Rest of CGI::Application code

Nothing to it, really. No need for wheel-reinvention when this wheel will do what you want.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.


Comment on Re: RFC: Apache::Controller
Download Code
Re^2: RFC: Apache::Controller
by revdiablo (Prior) on Dec 03, 2004 at 18:37 UTC

    Hmm, of course it looks simple and obvious when someone else does it. Maybe they should put an example like this in the CGI::Application docs. The only mention I saw of mod_perl said that it could be used with Apache::Registry, which caused me to immediately look elsewhere.

      Re: C::A and mod_perl. I guess the best place to go after the docs is the Wiki entry on using a mod_perl handler. Alas, the wiki doesn't seem to be as well known as it should be....

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2014-08-20 14:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (116 votes), past polls