prepared for 5.30 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/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 AUTHOR
143     Sebastian Riedel, "sri@oook.de"
144
145 THANK YOU
146     Andy Grundman, Andrew Ford, Andrew Ruthven, Autrijus Tang, Christian
147     Hansen, Christopher Hicks, Dan Sully, Danijel Milicevic, David Naughton,
148     Gary Ashton Jones, Geoff Richards, Jesse Sheidlower, Jody Belka, Johan
149     Lindstrom, Juan Camacho, Leon Brocard, Marcus Ramberg, Tatsuhiko
150     Miyagawa and all the others who've helped.
151
152 LICENSE
153     This library is free software . You can redistribute it and/or modify it
154     under the same terms as perl itself.
155