Hey Cory --

> What is the best way to get the value of 'run_mode' while 
> inside of the
> setup() function in CGI::Application.  I would like to use it 
> for some other
> operation, putting into a scalar would be great.  A 
> sub-routine reference
> would do me no good.

At the point that setup() is called, we do not know what the run-mode is.
In fact, the settings in setup() define exactly how we figure that out.
(See the mode_param() method, for instance.)

The "best" way to find out the run-mode in setup() is to check whatever form
parameter you intend to define via mode_param().

In general, however, it is best not to do something which would require that
you need to know the run-mode during setup().  Instead, consider putting
that code into your run-mode methods.  With some savvy object-orientation,
you can probably accomplish whatever goal you had in mind, via run-mode
methods instead of in setup().


Warmest regards,

-Jesse-



  Jesse Erlbaum, CTO
  Vanguard Media
  http://www.vm.com
  212.242.5317 x115
  [EMAIL PROTECTED]







---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.vm.com/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to