Eliminating cgiapp_prerun()

[prev] [thread] [next] [lurker] [Date index for 2004/06/11]

From: Shlomi Fish
Subject: Eliminating cgiapp_prerun()
Date: 20:48 on 11 Jun 2004
Is there any reason we are overriding cgiapp_prerun to determine the 
CGI::Application run-mode from $ENV{PATH_INFO} instead of calling 
mode_param() with a method reference?

To quote from the CGI::Application man page:

<<<
           Alternatively you can set mode_param() to use a call-back via sub-
           routine reference:

               $webapp->mode_param(\&some_method);

           This would allow you to create an instance method whose output
           would be used as the value of the current run-mode.  E.g., a "mode
           param method":

               sub some_method {
                 my $self = shift;
                 return 'run_mode_x';
               }

           This would allow you to programmatically set the run-mode based on
           something besides the value of a CGI parameter -- $ENV{PATH_INFO},
           for example.
>>>

(sorry for the indentation)

Regards,

	Shlomi Fish
-- 

---------------------------------------------------------------------
Shlomi Fish      shlomif@xxxx.xxx.xx
Homepage:        http://shlomif.il.eu.org/

Quidquid latine dictum sit, altum viditur.
        [Whatever is said in Latin sounds profound.]

Generated at 10:20 on 16 Jun 2004 by mariachi 0.52