2 Catalyst - The Elegant MVC Web Application Framework
5 # use the helper to start a new application
9 # add models, views, controllers
10 script/create.pl model Something
11 script/create.pl view Stuff
12 script/create.pl controller Yada
17 # command line interface
22 use Catalyst qw/My::Module My::OtherModule/;
24 use Catalyst '-Debug';
26 use Catalyst qw/-Debug -Engine=CGI/;
28 __PACKAGE__->action( '!default' => sub { $_[1]->res->output('Hello') } );
32 my ( $self, $c ) = @_;
33 $c->res->output('Hello');
39 '/^product[_]*(\d*).html$/' => sub {
40 my ( $self, $c ) = @_;
41 $c->stash->{template} = 'product.tt';
42 $c->stash->{product} = $c->req->snippets->[0];
46 See also Catalyst::Manual::Intro
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.
92 Join #catalyst on irc.perl.org.
96 http://lists.rawmode.org/mailman/listinfo/catalyst
97 http://lists.rawmode.org/mailman/listinfo/catalyst-dev
100 Catalyst::Manual, Catalyst::Test, Catalyst::Request, Catalyst::Response,
104 Sebastian Riedel, "sri@oook.de"
107 Andrew Ruthven, Danijel Milicevic, David Naughton, Gary Ashton Jones,
108 Jesse Sheidlower, Johan Lindstrom, Marcus Ramberg and all the others
112 This library is free software . You can redistribute it and/or modify it
113 under the same terms as perl itself.