Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Why CGI::Application?

by zby (Vicar)
on Jan 13, 2004 at 14:09 UTC ( #320956=note: print w/replies, xml ) Need Help??

in reply to Why CGI::Application?

I have just recently started to explore C::A as well. Here is a CGI::Application wiki by the way.

The question that intrigues me is why there is another dispatch mechanism build using the run_modes method. Why the object dispatch is not enough? In what circumstances another redirection layer is needed?

Update: run_modes not run_mode.

Update: For security reasons there should be a list of methods that can be called from the web. That's unevitable, at least untill perl has public and private methods.

Replies are listed 'Best First'.
Re: Re: Why CGI::Application?
by derby (Abbot) on Jan 13, 2004 at 14:47 UTC
    If I'm following your question correctly, the payoff of the run_modes method is so you can have multiple mappings of modes to methods. It's odd, but not unheard of, to have two differently named modes invoke the same method (think AUTOLOAD).


      Ah - I'd rather do:
      sub mode1{ my $self = shift; return $self->mode2(); }
      Is it so common place that the shorcut justifies the overhead of the additional run mode hash?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://320956]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2018-05-20 13:59 GMT
Find Nodes?
    Voting Booth?