in reply to seeking further clarity on dispatch logic w/ CGI::Application & FormBuilder
It is now some time (about three years) since I tried using CGI::FormBuilder with CGI::Application. I stopped doing it, because in part the two modules fight with each other. Despite the protestations of the author of CGI::FormBuilder the creation of the actual forms is not so onerous. The far more diffcult part is handling the validation. Now whilst CGI::FormBuilder will do some of this for you, it is hard to integrate it into CGI::Application.
I have found, through several rather large Webapps - all based on CGI::Application that the preferable method is to use Data::FormValidator through the excellent CGI::Application::Plugin::ValidateRM module which has a tight and consistent interface within CGI::Application.
As Sam Tregar has already suggested, the use of your if .. else statements within a CGI::Application runmode sends shivers up my spine and suggests that you have two dispatch mechanisms at work here.
In its place as a Form Handler for small stand-alone application CGI::FormBuilder is good. But as part of a framewaork using CGI::Application I am not sure.
|
|---|