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]

Reply via email to