On Thu, 23 May 2002, Cory Trese wrote:

> Lets stimulate discussion!
It's a nice day today :)

> We have two types of patterns that I see : (1) redirecting a user during
> initialization, (2) after another run_mode is done, or has decided that it
> cannot provide additional progress for the user without intervention from
> another run_mode.

For type 1 Jesse is pondering the solution :)
The $self->run_mode('something') is also useful to transform <input
type="image"> names into something more useful and less dependent from javascript,
as suggested in this mailing list.

> I am wondering just the same thing ... After the new feature (change runmode
> function), we will be left with (I think) three ways to do this :
>
> (1) return $self->other_run_mode;

I would change this that way:

        sub some_run_mode
        {
                # eventually
                # $self->append_content('...');
                $self->run_mode('named_run_mode');
                return;
        }

and change also C::A::run with something like:

        while ($rm = $self->run_mode())
        {
                pre_run($rm);
                real_run($rm);
        }
        print $self->content;

The nice thing here is that you can use named run modes. This opens a way
to a fully configurable workflow for run modes.
There are many implications, first of all it brokes the current behaviour
of run modes subs, unless append_content is called also inside the run
loop. This is just an idea, a simple sketch for a dispatcher.

> (2) print HTML redirect
> (3) use die / eval / carp

The other ways remain valid of course. I haven't other ways.

Sorry for the insane ideas :) Ciao,

        Valerio


 Valerio Paolini, <http://130.136.3.200/~paolini>
--------------------------------------------------
 what is open-source about? Learn, and then give back


---------------------------------------------------------------------
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