2 Catalyst - The Elegant MVC Web Application Framework
5 # use the helper to start a new application
9 # add models, views, controllers
10 perl bin/create model Something
11 perl bin/create view Stuff
12 perl bin/create controller Yada
17 # command line interface
20 See also L<Catalyst::Manual::Intro>
24 use Catalyst qw/My::Module My::OtherModule/;
26 use Catalyst '-Debug';
28 use Catalyst qw/-Debug -Engine=CGI/;
30 __PACKAGE__->action( '!default' => sub { $_[1]->res->output('Hello') } );
34 my ( $self, $c ) = @_;
35 $c->res->output('Hello');
41 '/^product[_]*(\d*).html$/' => sub {
42 my ( $self, $c ) = @_;
43 $c->stash->{template} = 'product.tt';
44 $c->stash->{product} = $c->req->snippets->[0];
49 Catalyst is based upon Maypole, which you should consider for smaller
52 The key concept of Catalyst is DRY (Don't Repeat Yourself).
54 See Catalyst::Manual for more documentation.
56 Omit the Catalyst::Plugin:: prefix from plugins. So
57 Catalyst::Plugin::My::Module becomes My::Module.
59 use Catalyst 'My::Module';
61 You can also set special flags like -Debug and -Engine.
63 use Catalyst qw/-Debug My::Module/;
65 The position of plugins and flags in the chain is important, because
66 they are loaded in the same order they appear.
69 use Catalyst '-Debug';
77 Force Catalyst to use a specific engine. Omit the Catalyst::Engine::
80 use Catalyst '-Engine=CGI';
84 Overload to enable debug messages.
87 Returns a hashref containing your applications settings.
90 Catalyst::Manual, Catalyst::Test, Catalyst::Request, Catalyst::Response,
94 Sebastian Riedel, "sri@oook.de"
97 Danijel Milicevic, David Naughton, Gary Ashton Jones, Jesse Sheidlower,
98 Johan Lindstrom, Marcus Ramberg and all the others who've helped.
101 This library is free software . You can redistribute it and/or modify it
102 under the same terms as perl itself.