Catalyst::Helper::Controller::Scaffold::Mason - Helper for Scaffolding
# Imagine you want to generate a scaffolding controller MyApp::C::SomeTable # for a CDBI table class MyApp::M::CDBI::SomeTable script/myapp_create.pl controller SomeTable Scaffold::Mason CDBI::SomeTable
Helper for Scaffolding.
Templates are Mason so you'll need a Mason View Component and a forward in your end action too, or the DefaultEnd plugin.
Note that you have to add these lines to your CDBI class...
use Class::DBI::AsForm; use Class::DBI::FromForm;
for Catalyst::Model::CDBI you can do that by adding this
additional_base_classes => [qw/Class::DBI::AsForm Class::DBI::FromForm/],
to the component config. Also, change your application class like this:
use Catalyst qw/-Debug FormValidator/;
Does the actual work. Called from helper api.
Sebastian Riedel
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
[% class %] - Scaffolding Controller Component
See "[% app %]"
Scaffolding Controller Component.
Sets a template.
Forwards to list.
Destroys a row and forwards to list.
Adds a new row to the table and forwards to list.
Edits a row and forwards to edit.
Fetches a row and sets a template.
[% author %]
To install Catalyst::Helper::Controller::Scaffold::Mason, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Helper::Controller::Scaffold::Mason
CPAN shell
perl -MCPAN -e shell install Catalyst::Helper::Controller::Scaffold::Mason
For more information on module installation, please visit the detailed CPAN module installation guide.