RapidApp::Responder
package MyModule; sub content { if ($error) die RapidApp::Responser::MyErrorResponder->new(\%params); return RapidApp::Responser::MyNormalResponder->new(\%params); }
A "Responder" is much like a Catalyst::View, except it is designed to be allocated per request, and it can be thrown. This is much more convenient and less error-prone than setting view parameters, putting the view name in the stash, and forwarding to the view.
In fact, I would have naamed the class "View" if that weren't so likely to lead to confusion.
For interoperability with Catalyst, a Responder can be converted into a Catalyst::Action. This attribute will create or return a cached Action object which runs this responder.
This is the main processing method of Responder, much like View->process($c);
It fills in the fields of $c->response
To install RapidApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RapidApp
CPAN shell
perl -MCPAN -e shell install RapidApp
For more information on module installation, please visit the detailed CPAN module installation guide.