Hi,
Look into CGI::Application::Plugin::Forward, it does this.
Usually after you finish a runmode that saves something, or deletes
etc, you want to forward onto a function that draws your page, pulls
in your variables and lists etc.
This function is ideal for that.
Jeff.
On 12/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi all.
> New to CGI::App and am wondering how to do the following in C::A that I
> was doing with a switch statement previously.
>
> The old:
>
> SWITCH: for ($query->param('funct')) {
> /save project/i && do { saveproject(); editproject(); last; };
> }
>
> The above runs sub called 'saveproject' and then when completed runs
> 'editproject'. How do I run two runmodes in one trip to my application
> with C::A?
>
> The new:
>
> sub setup {
> $self->start_mode('menu');
> $self->mode_param('rm');
> $self->run_modes(
> 'menu' => 'adminmenu',
> 'save' => 'saveproject',
> ???????
> }
>
> Is there anyway to send a hash, something like:
>
> sub setup {
> $self->start_mode('menu');
> $self->mode_param('rm');
> $self->run_modes(
> 'menu' => 'adminmenu',
> 'save' => { 'step1' => 'saveproject',
> 'step2' => 'editproject'}
> }
>
> Of course, I could call 'editproject' from 'saveproject', but that defeats
> the modularity of the script.
>
> Thanks, Brad
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> Web Archive: http://www.mail-archive.com/[email protected]/
> http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Jeff MacDonald
http://www.halifaxbudolife.ca
http://www.nintai.ca
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]