=head2 What is Catalyst?
Catalyst is an elegant web application framework, extremely flexible
-yet extremely simple. It's similar to Ruby on Rails, Spring (Java),
-and L<Maypole>, upon which it was originally based. Its most important
-design philosphy is to provide easy access to all the tools you need
-to develop web applications, with few restrictions on how you need to
-use these tools. However, this does mean that it is always possible to
-do things in a different way. Other web frameworks are B<initially>
-simpler to use, but achieve this by locking the programmer into a
-single set of tools. Catalyst's emphasis on flexibility means that you
-have to think more to use it. We view this as a feature. For example,
-this leads to Catalyst being more suited to system integration tasks
-than other web frameworks.
+yet extremely simple. It's similar to Ruby on Rails, Spring (Java), and
+L<Maypole|Maypole>, upon which it was originally based. Its most
+important design philosphy is to provide easy access to all the tools
+you need to develop web applications, with few restrictions on how you
+need to use these tools. However, this does mean that it is always
+possible to do things in a different way. Other web frameworks are
+I<initially> simpler to use, but achieve this by locking the programmer
+into a single set of tools. Catalyst's emphasis on flexibility means
+that you have to think more to use it. We view this as a feature. For
+example, this leads to Catalyst being more suited to system integration
+tasks than other web frameworks.
=head3 MVC
Catalyst doesn't enforce anything. See L<Catalyst::Manual::About> for
a general discussion of these issues.
-All components must inherit from L<Catalyst::Base>, which provides a
-simple class structure and some common class methods like C<config> and
-C<new> (constructor).
+Model, View and Controller components must inherit from L<Catalyst::Model>,
+L<Catalyst::View> and L<Catalyst::Controller>, respectively. These, in turn, inherit
+from L<Catalyst::Component> which provides a simple class structure and some
+common class methods like C<config> and C<new> (constructor).
package MyApp::Controller::Catalog;
use strict;
- use base 'Catalyst::Base';
+ use base 'Catalyst::Controller';
__PACKAGE__->config( foo => 'bar' );
INSERT INTO foo (data) VALUES ('TEST!');
- % sqlite /tmp/myapp.db < myapp.sql
+ % sqlite3 /tmp/myapp.db < myapp.sql
Now we can create a DBIC::Schema model for this database.
sub foo : Private { }
Matches no URL, and cannot be executed by requesting a URL that
-corresponds to the action key. Private actions can be executed only
-inside a Catalyst application, by calling the C<forward> method:
+corresponds to the action key. Catalyst's :Private attribute is
+exclusive and doesn't work with other attributes (so will not work
+combined with Path or Chained attributes). With the exception of the
+C< index >, C< auto > and C< default > actions, Private actions can
+only be executed from inside a Catalyst application, by calling the
+C<forward> or C<detach> methods:
$c->forward('foo');
+ # or
+ $c->detach('foo');
See L</Flow Control> for a full explanation of C<forward>. Note that, as
discussed there, when forwarding from another component, you must use
Mailing lists:
- http://lists.rawmode.org/mailman/listinfo/catalyst
- http://lists.rawmode.org/mailman/listinfo/catalyst-dev
+ http://lists.scsys.co.uk/mailman/listinfo/catalyst
+ http://lists.scsys.co.uk/mailman/listinfo/catalyst-dev
=head1 AUTHOR