Hiya Mark -

> This a run mode to
> process a entity that has just been updated in a form:
>
> sub admin_user_insert_process {
>       my $self = shift;
>
>       # Here I dynamically return them to a different run mode
>         # Either a "main page" or the same form to make further updates.
>        # failsafe is JavaScript is missing. -mls
>       $FORM{return_rm} ||= 'admin_index';
>       return eval( '$self->'.$FORM{return_rm}.q{(undef,msg=>'User Added
> Successfully')} );
>    }

> What do you think? Is this "use" or "abuse" of the CGI::App framework?

  I think that's doing pretty much the same thing I described. :-)

  The use of the eval () is a clever trick to "chain" to another run-mode
which ultimately displays stuff. :-)

  return eval( '$self->'.$FORM{return_rm}.q{(undef,msg=>'User Added
> Successfully')} );

This is the part where I think it'd be nice to have some help from
CGI::Application.

If the action simply returned:  return $FORM{return_rm};





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to