[EMAIL PROTECTED] wrote:
Perrin Harkins <[EMAIL PROTECTED]> wrote on Wed, Apr 16, 2008 at 09:30:48AM 
-0400:
On Tue, Apr 15, 2008 at 11:09 PM,  <[EMAIL PROTECTED]> wrote:
 Am I forced to name the AUTOLOAD
 method something other than AUTOLOAD?
Doctor, it hurts when I do this...

:)  Yes, I realize it seems somewhat trivial, but here's my rationale: If I
must name the AUTOLOAD method something other than AUTOLOAD, then I am
forced to use the hash version of run_modes() in setup(). Since all my
run mode methods have the same name as the run modes themselves, I must
enter each run mode's name twice:

  $self->run_modes(
    "mode1" => "mode1",
    "mode2" => "mode2",
    "AUTOLOAD" => "catchall"
  );
instead of: $self->run_modes([qw/
    mode1
    mode2
    AUTOLOAD
  /]);


You can do both:

  $self->run_modes([qw/ an array /]);
  $self->run_modes( a_single => 'named_mode' );

run_modes() is additive, so this sets up three (3) run modes.

rhesa

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to