View on
MetaCPAN
PJ-DSI-DEVOPS > App-AutoCRUD > App::AutoCRUD::Controller

Download:
App-AutoCRUD-0.13.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  3
Open  0
View/Report Bugs
Source  

NAME ^

App::AutoCRUD::Controller - parent class for controllers

DESCRIPTION ^

Parent class for all controllers

METHODS ^

respond

Calls the "serve" method to build response data; then calls the "render" in App::AutoCRUD::View method within the appropriate view to build the Plack response.

serve

Abstract method (to be redefined in subclasses); should return the datastructure to be passed to the App::AutoCRUD::View class.

redirect

  $controller->redirect($url);

Convenience method to redirect to another URL. Sets the view attribute in App::AutoCRUD::Context to an instance of App::AutoCRUD::View::Redirect; then returns the given URL.

This is used by all POST methods, following the http://en.wikipedia.org/wiki/Post/Redirect/Get pattern to avoid duplicate form submissions.

syntax highlighting: