[cgiapp] can't display and validate only in one run mode with CAP::Plugin::ValidateRM ?
Mark Stosberg
mark at summersault.com
Thu Jun 16 13:48:27 EDT 2011
On 06/14/2011 10:00 PM, silent wrote:
> Hi, list
>
> can I do displaying form and validate form only in one run mode ?
It is not designed for this.
> # run mod
> sub register {
> if ( GET request ) {
> #display form
> }elsif ( POST requst ) {
>
> #validate
> }
> }
To put this dispatching logic into a run mode subverts of the few
features CGI::Application provides, which is dispatch a request to the
current run mode. The REST plugin further automates how a pair of GET
and POST requests might be handled.
The solution I recommend is to use to run modes.
Mark
More information about the cgiapp
mailing list