3 Catalyst::Manual::Installation - Catalyst Installation
9 This section of the Catalyst tutorial looks at a number of items
10 required to first get going with Catalyst development.
16 On one hand, Catalyst gains immediate power and flexibility through is
17 use of CPAN (the Comprehensive Perl Archive Network, an enormous global
18 repository containing over 10,000 free modules). On the other hand,
19 Catalyst's reliance on CPAN can complicate initial installations.
20 Fortunately, there are a growing number of methods that can dramatically
21 ease this undertaking:
27 Matt Trout's C<cat-install>
29 Available at L<http://www.shadowcatsystems.co.uk/static/cat-install>,
30 C<cat-install> can be a quick and painless way to get Catalyst up and
31 running. Just download the script from the link above and type C<perl
36 Chris Laco's CatInABox
38 Download the tarball from
39 L<http://handelframework.com/downloads/CatInABox.tar.gz> and unpack it
40 on your machine. Depending on your OS platform, either run C<start.bat>
45 Pre-Built VMWare Images
47 Under the VMWare community program, work is ongoing to develop a number
48 of VMWare images where an entire Catalyst development environment has
49 already been installed, complete with database engines and a full
50 complement of Catalyst plugins.
57 In addition to the "all-in-one" approaches mentioned above, there are a
58 variety of other installation techniques:
66 The traditional way to install Catalyst is directly from CPAN using
67 C<Task::Catalyst> bundle:
69 $ perl -MCPAN -e 'install Task::Catalyst'
71 Unless you have a particularly complete set of Perl modules already
72 installed, be prepared for a large number of nested dependencies.
78 For users of Gentoo, see
79 C<http://gentoo-wiki.com/HOWTO_Catalyst_Framework> for automated
80 installations. In short, simply mount the portage overlay and type
81 C<emerge catalystframework>.
87 FreeBSD users can get up and running quickly by typing C<cd
88 /usr/ports/www/p5-Catalyst && make install>.
94 Windows users can take advantage of the PPM tool that comes with
95 ActivePerl to jumpstart their Catalyst environment. Directions are
96 available at L<http://catalyst.infogami.com/katalytes/cat_on_windows>.
100 B<NOTE:> Although all of the above methods can be used to install a base
101 Catalyst system, only the VMWare image is likely to have all of the
102 plugins and modules you need to complete this tutorial. When you start
103 the C<script/myapp_server.pl> development server later to run your
104 application, it will tell you about any modules that are missing. To
105 add them, type something along the lines of the following
106 (C<Catalyst::Model::DBIC::Schema> is used here as a representative
109 # perl -MCPAN -e shell
111 cpan shell -- CPAN exploration and modules installation (v1.87)
112 ReadLine support enabled
114 cpan> install Catalyst::Model::DBIC::Schema
120 Although Catalyst is a very flexible platform that can be used for wide
121 variety of applications, the bulk of Catalyst developers use it to build
122 web applications that set on top of a relational database.
123 Consequently, you will very likely need:
131 Although Apache is obviously an extremely popular choice, lighttpd has a
132 growing following. Catalyst applications can also be run under IIS.
138 Although other databases with support for Perl are certainly possible,
139 most Catalyst applications tend to use one of the following:
145 SQLite is a popular choice for development and testing because it does
146 note require that a database daemon be running or configured. It
147 operates on C<.db> files that are generally located in the directory of
148 your Catalyst application project. More information is available at
155 MySQL is an extremely popular database available at L<www.mysql.com>.
161 PostgreSQL is a well-respected database available at
162 L<http://www.postgresql.org/>.
166 This tutorial will primarily focus on SQLite because of its simplicity;
167 however, modifications in the script required to support MySQL and
168 PostgreSQL will be presented in the Appendix.
170 B<Note:> One of the advantages of the MVC design patterns is that
171 applications become much more database independent. As such, you will
172 notice that only the C<.sql> files used to initialize the database
173 change between database systems... the Catalyst code all remains the