well, functionally i think the concept is sound, but the name is trying to be two different things. first, you want the 'mutability' of the run mode to only occur during cgiapp_prerun, but you'd like to be able to retrieve the current run mode at any time. I would lean towards simply calling it run_mode, with the caveat that it only accepts parameters if called from cgiapp_prerun. Fail if abused, explaning that it can only be used this way from cgiapp_prerun. Document this too, including the rationale you posted earlier. I know it isn't as in-your-face as putting 'prerun' in the sub's name, but IMHO it's a good comprimise.
You'll also probably want to document that with the introduction of this run_mode (or whatever you wind up calling it) sub, that it then becomes a Bad Idea to try to acquire the run mode (as people would have had to do up till now) by going back to the original source (either the cgi parameter or the subref supplied in setup() ) -Stephen -----Original Message----- From: Jesse Erlbaum [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 12:20 PM To: '[EMAIL PROTECTED]' Subject: [cgiapp] FW: [cgiapp] cgiapp_prerun() method I received the following suggestion in email, which I am forwarding to the list (with permission of the author). I think he's for a good idea for the method name here. What think 'yall? -Jesse- -----Original Message----- From: tomasz konefal Sent: Thursday, May 23, 2002 11:47 AM To: Jesse Erlbaum Subject: Re: [cgiapp] cgiapp_prerun() method > To satisfy the desire voiced by some to be able to figure out the current > run-mode, I will also add a method get_current_runmode(). Any other > suggestions? I'd like to put out a release in the next day or so which > includes this as well as Sam's HTML::Template PATH patch. why not have a 'prerun_mode()' method which returns the current runmode if no parameters are passed and changes/sets the runmode if one is specified as a parameter? --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@lists.vm.com/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [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]