Hi Valerio --
> I installed CGI::Application yesterday and I'm still asking myself why
> I didn't use it before :). It was really simple to start using it, but
> I encountered immediately the same situation here described:
>
> > The cgiapp_prerun() provides an important hook, but it is
> still a bit
> > limited. One thing it does not yet do is provide a facility through
> > which you can modify the run-mode. After I made the
> release, it occurred
> > to me that changing the run-mode based on some other logic would be
> > useful. That might allow you to put a dynamic switch
> in-line which is
> > triggered based on some other logic.
>
> So, what are you going to do about this? Are you planning to release
> a new version of C::A?
I've been contemplating everybody's feedback (in particular, Stephen
Howard's suggestion to take time to contemplate everybody's feedback!), and
I think I am ready to make a new release.
After much deliberation, I am less enthusiastic about my own suggestion of
returning the new run-mode, and more favorable to Steve Comrie's suggestion
(further elaborated upon by Greg Marr and Brett Sanger) to have an object
method through which the run-mode could be changed.
I'm thinking about a method which would, by its name, clearly suggest that
it will only have an effect in cgiapp_prerun(). Furthermore, I'm
considering actually throwing an exception if the method is called somewhere
besides within cgiapp_prerun(). My main concern is that I don't want to
have to field questions like this:
"I'm in 'mode_one' and I want to send the user to 'mode_two'. I tried
calling change_runmode('mode_two') but nothing happened! What's going
on?!?"
It's my big fear that new users are going to assume functionality which
doesn't exist, and will forget the basics, such as directly calling a
run-mode method or using an HTTP redirect.
So, that said.... How about: change_prerun_mode() ?
What do you think?
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.
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317 x115
[EMAIL PROTECTED]
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]