[cgiapp] REST tunneling in CGI::Application::Dispatch

Jaldhar H. Vyas jaldhar at braincells.com
Wed May 18 01:57:27 EDT 2011


On Mon, 16 May 2011, Mark Stosberg wrote:

> Tim & Jaldhar
>
> I like the idea having the REST functionality available through a
> plugin, and Jaldhar's functionality looks fairly complete, including
> tunneling, although that's a bit hard to discover now.
>
> Given this, do either of you still have changes you recommend to
> ::Dispatch to improve the REST experience with CGI::Application?
>

Well, I think this would have to go into CGI::Application itself not 
dispatch but in my plugin I have a method called rest_error_mode.  The 
main reason this seeming redundancy exists is because CGI::Apps error_mode 
is only used after the run mode has already been set (see sub __get_body) 
so it cannot be used if there is an error in the dispatch process itself. 
Perhaps the fix could be as simple as moving the call to __get_runmeth 
into the eval but I'm sure you understand all the ramifications better 
than me.


-- 
Jaldhar H. Vyas <jaldhar at braincells.com>


More information about the cgiapp mailing list