[cgiapp] Proposal: CGI::Application::Plugin::ValidateQuery

Michael Peters mpeters at plusthree.com
Sat Apr 11 12:46:53 EDT 2009


Mark Stosberg wrote:

> This means we had to find some other way to interrupt the flow and
> return our error page. The solution is to write a suicide note and then
> pull the trigger. Or rather, in validate_query(), if validation fails,
> we do a just-in-time setting of error_mode(), and then die, which
> interrupts the flow and triggers the error_mode to be called.

> Now that I've thought of this approach, it makes me want to apply to to
> the ::ValidateRM interface.  Anyone see a reason not to take this
> approach for this plugin, or ValidateRM?

Some people feel that exceptions shouldn't be used for flow control (I'm not 
usually one of them) but some of them are very opinionated. Just wanted to bring 
that up.

-- 
Michael Peters
Plus Three, LP



More information about the cgiapp mailing list