How to install Catalyst.
On one hand, Catalyst gains immediate power and flexibility through its use of CPAN (the Comprehensive Perl Archive Network, an enormous global repository containing over 10,000 free modules). On the other hand, Catalyst's reliance on CPAN can complicate initial installations, especially in shared-hosting environments where you, the user, do not have easy control over what versions other modules are installed.
It is worth stressing that the difficulties found in installing Catalyst are caused not by anything intrinsic to Catalyst itself, but rather by the interrelated dependencies of a large number of required modules.
Fortunately, there are a growing number of methods that can dramatically ease this undertaking:
Available at http://www.shadowcatsystems.co.uk/static/cat-install,
cat-installcan be a quick and painless way to get Catalyst up and running on your system. Just download the script from the link above and type
perl cat-install. This script automates the process of installing Catalyst itself and its dependencies, with bits of overriding so that the process does not require user interaction.
Chris Laco's CatInABox
CatInABox is a complete version of Catalyst that is installed locally on your system, so that you don't need to go through the effort of doing a full install. Simply download the tarball from http://handelframework.com/downloads/CatInABox.tar.gz and unpack it on your machine. Depending on your OS platform, either run
start.shto set your bin/PERLLIB paths. This tarball contains everything needed to try out Catalyst including Catalyst itself, Template Toolkit, several Authentication modules, StackTrace, and a few other plugins.
A special Win32 version is available upon request that contains many more plugins and pre-compiled modules, including DBIx::Class, DBI, SQLite, and Session support. If you are interested in this version, please send e-mail to
Pre-Built VMWare Images
Under the VMWare community program, work is ongoing to develop a number of VMWare images where an entire Catalyst development environment has already been installed, complete with database engines and a full complement of Catalyst plugins.
In addition to the "all-in-one" approaches mentioned above, there are a variety of other installation techniques:
The traditional way to install Catalyst is directly from CPAN using
$ perl -MCPAN -e 'install Task::Catalyst'
Unless you have a particularly complete set of Perl modules already installed, be prepared for a large number of nested dependencies.
For users of Gentoo, see
http://gentoo-wiki.com/HOWTO_Catalyst_Frameworkfor automated installations. In short, simply mount the portage overlay and type
FreeBSD users can get up and running quickly by typing
cd /usr/ports/www/p5-Catalyst && make install, or
portinstallis installed on your system.
Windows users can take advantage of the PPM tool that comes with ActivePerl to jumpstart their Catalyst environment. Directions are available at http://catalyst.infogami.com/katalytes/cat_on_windows.
Catalyst uses Subversion for version control. To checkout the latest:
$ svn co http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst/
NOTE: Although all of the above methods can be used to install a base Catalyst system, only the VMWare image is likely to have all of the plugins and modules you need to use Catalyst properly, and to complete the tutorial. When you start the
script/myapp_server.pl development server, it will tell you about any modules that are missing. To add them, type something along the lines of the following (
Catalyst::Model::DBIC::Schema is used here as a representative example):
# perl -MCPAN -e 'install Catalyst::Model::DBIC::Schema' ...