The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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.