Elizabeth Vaughn wrote:
>
> As an example, I sometimes have the same form which can be accessed by
> people with different "login types". The code to process the form is
> identical, but the code to generate the output is different. This would be
> a case where run_mode/run_mode/print would seem to work well. The first
> run_mode method is used to process the form, but needs to produces no
> output. Control is then passed to the second run_mode to produce the
> appropriate output, in this case based on the "login type".
I think the concept makes sense to me-- you want a run mode that may
choose another run mode, which returns the output. Does this work?
sub my_first_mode {
my $self = shift;
# decide, possibly using if/else switches
return $self->my_second_mode
}
or to be more dynamic, you do return like this:
return eval('$self->'.$return_mode).
I do that in one place in my Cascade application.
-mark
. . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
[EMAIL PROTECTED] Summersault, LLC
v: 765-939-9301 ext 223 website development
. . . . . http://www.summersault.com/ . . . . . . .
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]