3 Catalyst::Manual::Cookbook - Cooking with Catalyst
11 =head2 Force debug screen
13 You can force Catalyst to display the debug screen at the end of the request by
14 placing a die() call in the _end action.
18 my ( $self, $c ) = @_;
23 =head2 Disable statistics
25 Just add this line to your application class if you don't want those nifty
26 statistics in your debug messages.
28 sub Catalyst::Log::info { }
32 Scaffolding is very simple with Catalyst.
33 Just use Catalyst::Model::CDBI::CRUD as baseclass.
35 # lib/MyApp/Model/CDBI.pm
36 package MyApp::Model::CDBI;
39 use base 'Catalyst::Model::CDBI::CRUD';
42 dsn => 'dbi:SQLite:/tmp/myapp.db',
51 use Catalyst 'FormValidator';
54 name => 'My Application',
55 root => '/home/joeuser/myapp/root'
60 my ( $self, $c ) = @_;
61 $c->form( optional => [ MyApp::Model::CDBI::Table->columns ] );
62 $c->forward('MyApp::Model::CDBI::Table');
68 Modify the $c->form() parameters to match your needs, and don't forget to copy
73 Sebastian Riedel, C<sri@oook.de>
77 This program is free software, you can redistribute it and/or modify it under
78 the same terms as Perl itself.