Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
We don't bite newbies here... much
 
PerlMonks  

Re: designing a dispatch class

by tlm (Prior)
on Mar 30, 2005 at 23:20 UTC ( #443634=note: print w/ replies, xml ) Need Help??


in reply to designing a dispatch class

OK, I may be way off from what you're looking for, but if you haven't yet maybe you should take a look at merlyn's CGI::Prototype. In addition to the man page for the module, see also merlyn's article and slide show.

the lowliest monk


Comment on Re: designing a dispatch class
Re^2: designing a dispatch class
by geektron (Curate) on Mar 30, 2005 at 23:29 UTC
    looking at the article briefly, it's a little too featureless. i'll need to take a closer look at it and see if i can use it to instantiate objects ...

    ultimately, i need to do something like:

    my $foo; $foo = MyModule::ActionSet1->new() if ( condition ); $foo = MyModule::ActionSet2->new() if ( condition2 ); $foo->process(); print $foo->output();
    there are enough actions that even a hash-based dispatch table would get ugly.

    it could split into a set of CGI::Application-based classes, which is perfect for CGI::Application::Dispatch-based applications. but i'm not sure that's the direction i *should* be going.

      I found the slide show more illuminating than the article; start with that. Take a look at the activate method (there's a slide on it about 2/3 of the way through the presentation), which neatly summarizes the module's logic.


      the lowliest monk

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2014-04-21 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (490 votes), past polls