Mark, Yep, that does it. I was just envisioning another way that avoided the second set of if/else switches by utilizing what CGI::App does so well.
Elizabeth > -----Original Message----- > From: Mark Stosberg [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 04, 2001 12:11 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [cgiapp] Grab output of a run mode without headers > > > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
