58c0b276453a41ae069ddfa2703a493fe45e8668
[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/myapp_create.pl model Something
11         script/myapp_create.pl view Stuff
12         script/myapp_create.pl controller Yada
13
14         # built in testserver
15         script/myapp_server.pl
16
17         # command line interface
18         script/myapp_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         sub default : Private { $_[1]->res->output('Hello') } );
29
30         sub index : Path('/index.html') {
31             my ( $self, $c ) = @_;
32             $c->res->output('Hello');
33             $c->forward('foo');
34         }
35
36         sub product : Regex('^product[_]*(\d*).html$') {
37             my ( $self, $c ) = @_;
38             $c->stash->{template} = 'product.tt';
39             $c->stash->{product} = $c->req->snippets->[0];
40         }
41
42     See also Catalyst::Manual::Intro
43
44 DESCRIPTION
45     The key concept of Catalyst is DRY (Don't Repeat Yourself).
46
47     See Catalyst::Manual for more documentation.
48
49     Catalyst plugins can be loaded by naming them as arguments to the "use
50     Catalyst" statement. Omit the "Catalyst::Plugin::" prefix from the
51     plugin name, so "Catalyst::Plugin::My::Module" becomes "My::Module".
52
53         use Catalyst 'My::Module';
54
55     Special flags like -Debug and -Engine can also be specifed as arguments
56     when Catalyst is loaded:
57
58         use Catalyst qw/-Debug My::Module/;
59
60     The position of plugins and flags in the chain is important, because
61     they are loaded in exactly the order that they appear.
62
63     The following flags are supported:
64
65     -Debug
66         enables debug output, i.e.:
67
68             use Catalyst '-Debug';
69
70         this is equivalent to:
71
72             use Catalyst;
73             sub debug { 1 }
74
75     -Engine
76         Force Catalyst to use a specific engine. Omit the
77         "Catalyst::Engine::" prefix of the engine name, i.e.:
78
79             use Catalyst '-Engine=CGI';
80
81 METHODS
82     debug
83         Overload to enable debug messages.
84
85     config
86         Returns a hashref containing your applications settings.
87
88     $c->engine
89         Contains the engine class.
90
91     $c->log
92         Contains the logging object. Unless it is already set Catalyst sets
93         this up with a "Catalyst::Log" object. To use your own log class:
94
95             $c->log( MyLogger->new );
96             $c->log->info("now logging with my own logger!");
97
98         Your log class should implement the methods described in the
99         "Catalyst::Log" man page.
100
101     $c->plugin( $name, $class, @args )
102         Instant plugins for Catalyst. Classdata accessor/mutator will be
103         created, class loaded and instantiated.
104
105             MyApp->plugin( 'prototype', 'HTML::Prototype' );
106
107             $c->prototype->define_javascript_functions;
108
109 CASE SENSITIVITY
110     By default Catalyst is not case sensitive, so "MyApp::C::FOO::Bar"
111     becomes "/foo/bar".
112
113     But you can activate case sensitivity with a config parameter.
114
115         MyApp->config->{case_sensitive} = 1;
116
117 LIMITATIONS
118     mod_perl2 support is considered experimental and may contain bugs.
119
120 SUPPORT
121     IRC:
122
123         Join #catalyst on irc.perl.org.
124
125     Mailing-Lists:
126
127         http://lists.rawmode.org/mailman/listinfo/catalyst
128         http://lists.rawmode.org/mailman/listinfo/catalyst-dev
129
130     Web:
131
132         http://catalyst.perl.org
133
134 SEE ALSO
135     Catalyst::Manual - The Catalyst Manual
136     Catalyst::Engine - Core Engine
137     Catalyst::Log - The Log Class.
138     Catalyst::Request - The Request Object
139     Catalyst::Response - The Response Object
140     Catalyst::Test - The test suite.
141
142 CREDITS
143     Andy Grundman
144
145     Andrew Ford
146
147     Andrew Ruthven
148
149     Autrijus Tang
150
151     Christian Hansen
152
153     Christopher Hicks
154
155     Dan Sully
156
157     Danijel Milicevic
158
159     David Naughton
160
161     Gary Ashton Jones
162
163     Geoff Richards
164
165     Jesse Sheidlower
166
167     Jody Belka
168
169     Johan Lindstrom
170
171     Juan Camacho
172
173     Leon Brocard
174
175     Marcus Ramberg
176
177     Matt S Trout
178
179     Robert Sedlacek
180
181     Sebastian Riedel
182
183     Tatsuhiko Miyagawa
184
185     Ulf Edvinsson
186
187 AUTHOR
188     Sebastian Riedel, "sri@oook.de"
189
190 LICENSE
191     This library is free software . You can redistribute it and/or modify it
192     under the same terms as perl itself.
193