new release
[catagits/Catalyst-Runtime.git] / README
1 NAME
2     Catalyst - The Elegant MVC Web Application Framework
3
4 SYNOPSIS
5         # use the helper to start a new application
6         catalyst.pl MyApp
7         cd MyApp
8
9         # add models, views, controllers
10         script/create.pl model Something
11         script/create.pl view Stuff
12         script/create.pl controller Yada
13
14         # built in testserver
15         script/server.pl
16
17         # command line interface
18         script/test.pl /yada
19
20         use Catalyst;
21
22         use Catalyst qw/My::Module My::OtherModule/;
23
24         use Catalyst '-Debug';
25
26         use Catalyst qw/-Debug -Engine=CGI/;
27
28         __PACKAGE__->action( '!default' => sub { $_[1]->res->output('Hello') } );
29
30         __PACKAGE__->action(
31             'index.html' => sub {
32                 my ( $self, $c ) = @_;
33                 $c->res->output('Hello');
34                 $c->forward('_foo');
35             }
36         );
37
38         __PACKAGE__->action(
39             '/^product[_]*(\d*).html$/' => sub {
40                 my ( $self, $c ) = @_;
41                 $c->stash->{template} = 'product.tt';
42                 $c->stash->{product} = $c->req->snippets->[0];
43             }
44         );
45
46     See also Catalyst::Manual::Intro
47
48 DESCRIPTION
49     Catalyst is based upon Maypole, which you should consider for smaller
50     projects.
51
52     The key concept of Catalyst is DRY (Don't Repeat Yourself).
53
54     See Catalyst::Manual for more documentation.
55
56     Omit the Catalyst::Plugin:: prefix from plugins. So
57     Catalyst::Plugin::My::Module becomes My::Module.
58
59         use Catalyst 'My::Module';
60
61     You can also set special flags like -Debug and -Engine.
62
63         use Catalyst qw/-Debug My::Module/;
64
65     The position of plugins and flags in the chain is important, because
66     they are loaded in the same order they appear.
67
68   -Debug
69         use Catalyst '-Debug';
70
71     is equivalent to
72
73         use Catalyst;
74         sub debug { 1 }
75
76   -Engine
77     Force Catalyst to use a specific engine. Omit the Catalyst::Engine::
78     prefix.
79
80         use Catalyst '-Engine=CGI';
81
82   METHODS
83    debug
84     Overload to enable debug messages.
85
86    config
87     Returns a hashref containing your applications settings.
88
89 SUPPORT
90     IRC:
91
92         Join #catalyst on irc.perl.org.
93
94     Mailing-Lists:
95
96         http://lists.rawmode.org/mailman/listinfo/catalyst
97         http://lists.rawmode.org/mailman/listinfo/catalyst-dev
98     
99 SEE ALSO
100     Catalyst::Manual, Catalyst::Test, Catalyst::Request, Catalyst::Response,
101     Catalyst::Engine
102
103 AUTHOR
104     Sebastian Riedel, "sri@oook.de"
105
106 THANK YOU
107     Andrew Ruthven, Danijel Milicevic, David Naughton, Gary Ashton Jones,
108     Jesse Sheidlower, Johan Lindstrom, Marcus Ramberg and all the others
109     who've helped.
110
111 LICENSE
112     This library is free software . You can redistribute it and/or modify it
113     under the same terms as perl itself.
114