X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F01_Intro.pod;h=05447d474a981c719e052588e576367a9d5759a3;hp=d5d9b6e61b67c2f66fe85faacddbcdc0ed313041;hb=96a8735673ba59a0cdc20672020dffab4d6209de;hpb=3ab6187c1a123983b6ae29e57f543328ce15755c diff --git a/lib/Catalyst/Manual/Tutorial/01_Intro.pod b/lib/Catalyst/Manual/Tutorial/01_Intro.pod index d5d9b6e..05447d4 100644 --- a/lib/Catalyst/Manual/Tutorial/01_Intro.pod +++ b/lib/Catalyst/Manual/Tutorial/01_Intro.pod @@ -72,8 +72,8 @@ catalyst subversion repository by issuing the command: svn co http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/ CatalystTutorial -This will download the most recent tarball for each chapter of the -tutorial into the CatalystTutorial directory on your machine. +This will download the most recent code for each chapter of the +tutorial into the CatalystTutorial directory on your machine. B B It should make little or no difference to Catalyst's operation, B because that represents a quick and easy for most people to +live CD> because that represents a quick and easy way for most people to try out Catalyst with virtually zero setup time and hassles. Also, the tutorial has been tested to work correctly with the versions of Catalyst and all the supporting modules in Debian 5 (see "VERSIONS @@ -92,12 +92,14 @@ AND CONVENTIONS USED IN THIS TUTORIAL" below for the specific versions for some of the key modules), so B (for example, a module changed its behavior in a newer version or a bug was introduced), B. See the "CATALYST INSTALLATION" -section below for more information. +worth giving Debian 5 a try>. -If you're reading this manual online, you can download the example +If you plan to follow along with Debian 5, you can jump down to the +"Debian" section under L below and it will walk you +though the setup of a fully functional Catalyst environment. If you +would prefer to install directly from CPAN, you can download the example program and all the necessary dependencies to your local machine by -installing the C distribution from CPAN: +installing the C distribution: cpan Task::Catalyst::Tutorial @@ -153,12 +155,15 @@ applications. =item * The use of SQLite as a database (with code also provided for MySQL and -PostgreSQL). +PostgreSQL). (Note: Because we make use of the DBIx::Class Object +Relational Mapping [ORM] layer, out our application will be database +agnostic and can easily be used by any of the databases supported +by DBIx::Class.) =item * -The use of L for automated form processing -and validation. +The use of L or L +for automated form processing and validation. =back @@ -194,15 +199,19 @@ Debian 5 (Lenny) =item * -Catalyst v5.80004 +Catalyst v5.80013 =item * -Catalyst::Devel v1.10 +Catalyst::Devel v1.21 =item * -DBIx::Class v0.08102 +DBIx::Class v0.08112 + +=item * + +Template Toolkit v2.20 =item * @@ -217,7 +226,7 @@ use. This tutorial has been tested against the following set of plugins: =item * -Catalyst::Plugin::Authentication -- v0.10011 +Catalyst::Plugin::Authentication -- v0.10015 =item * @@ -225,27 +234,27 @@ Catalyst::Plugin::Authorization::Roles -- v0.07 =item * -Catalyst::Plugin::ConfigLoader -- v0.22 +Catalyst::Plugin::ConfigLoader -- v0.27 =item * -Catalyst::Plugin::Session -- v0.20 +Catalyst::Plugin::Session -- v0.29 =item * -Catalyst::Plugin::Session::State::Cookie -- v0.10 +Catalyst::Plugin::Session::State::Cookie -- v0.17 =item * -Catalyst::Plugin::Session::Store::FastMmap -- v0.07 +Catalyst::Plugin::Session::Store::FastMmap -- v0.13 =item * -Catalyst::Plugin::StackTrace -- v0.09 +Catalyst::Plugin::StackTrace -- v0.11 =item * -Catalyst::Plugin::Static::Simple -- v0.21 +Catalyst::Plugin::Static::Simple -- v0.25 =back @@ -257,22 +266,28 @@ following command: perl -M<_mod_name_> -e '"print $<_mod_name_>::VERSION\n"' For example: - perl -MCatalyst::Plugin::StackTrace -e 'print "$Catalyst::Plugin::StackTrace::VERSION\n"' -Since the web browser is being used on the same box where Perl and the -Catalyst development server is running, the URL of -C will be used (the Catalyst development server -defaults to port 3000). If you are running Perl on a different box than -where your web browser is located (or using a different port number via -the C<-p> I option to the development server), then you -will need to update the URL you use accordingly. + perl -MCatalyst -e 'print "$Catalyst::VERSION\n";' + +or: + + perl -MCatalyst::Devel -e 'print "$Catalyst::Devel::VERSION\n";' =item * -Depending on the web browser you are using, you might need to hit -C or C to pull a fresh page when testing -your application at various points (see -L for a comprehensive +This tutorial will assume that the web browser is located on the same +system where the Catalyst development server is running, and +therefore use a URL of C (the Catalyst +development server defaults to port 3000). If you are running Perl on +a different box than where your web browser is located (or using a +different port number via the C<-p> I option to the +development server), then you will need to update the URL you use +accordingly. + +Please Note: Depending on the web browser you are using, you might +need to hit C or C to pull a fresh page +when testing your application at various points (see +L for a comprehensive list of options for each browser). Also, the C<-k> keepalive option to the development server can be necessary with some browsers (especially Internet Explorer). @@ -385,12 +400,15 @@ Install Catalyst: sudo aptitude update sudo aptitude -y install sqlite3 libdbd-sqlite3-perl libcatalyst-perl \ - libcatalyst-modules-perl libconfig-general-perl libsql-translator-perl \ - libdatetime-perl libdatetime-format-mysql-perl libio-all-perl \ - libperl6-junction-perl libmoosex-emulate-class-accessor-fast-perl + libcatalyst-modules-perl libdbix-class-timestamp-perl \ + libdbix-class-encodedcolumn-perl libperl6-junction-perl \ + libdatetime-format-sqlite-perl libconfig-general-perl \ + libhtml-formfu-model-dbic-perl -Let it install (normally about a 30-second operaton) and you are -done. +Let it install (normally about a 30 to 90-second operaton) and you are +done. (Note the '\' above. Depending on your environment, you might +be able to cut and paste the text as shown or need to remove the '\' +characters to that the command is all on a single line.) If you are using an image other than the "rescue" ISO, you will also need to run the following command to install additional packages: @@ -425,7 +443,9 @@ deleted). =item * If you are installing modules from CPAN, you can free up some space -with "C". +with "C" (change "/root/" in the previous +command to match your home directory or the location where CPAN +has been configured to perform build operations). =item * @@ -516,7 +536,7 @@ of the options to install Ubuntu on your drive. Matt Trout's C -Available at L, +Available at L, C can be a fairly painless way to get Catalyst up and running. Just download the script from the link above and type C. Depending on the speed of your Internet connection and @@ -597,22 +617,19 @@ of each part for the appropriate svn command to use). B You can run the test cases for the final code through Chapter 8 with the following commands: - sudo cpan Catalyst::Model::DBIC::Schema Time::Warp DBICx::TestDatabase \ - DBIx::Class::DynamicDefault DBIx::Class::TimeStamp DBIx::Class::EncodedColumn wget http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/MyApp_Chapter8.tgz tar zxvf MyApp_Chapter8.tgz cd MyApp - CATALYST_DEBUG=0 prove --lib lib t + CATALYST_DEBUG=0 prove -wl t -If you wish to include the L section in -your tests, substitute C for -C in the URL above. However, you will also need to -run the following additional commands: +If you wish to include the L section in your tests, +substitute C for C in the URL +above. - sudo aptitude -y install libhtml-formfu-perl libmoose-perl \ - libregexp-assemble-perl libhtml-formfu-model-dbic-perl - sudo aptitude clean - sudo cpan Catalyst::Component::InstancePerContext Catalyst::Controller::HTML::FormFu + wget http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/MyApp_Chapter9_FormFu.tgz + tar zxvf MyApp_Chapter8.tgz + cd MyApp + CATALYST_DEBUG=0 prove -wl t You can also fire up the application under the development server that is conveniently built in to Catalyst. Just issue this command from the C directory where you @@ -636,7 +653,7 @@ Kennedy Clark, C Please report any errors, issues or suggestions to the author. The most recent version of the Catalyst Tutorial can be found at -L. +L. Copyright 2006-2008, Kennedy Clark, under Creative Commons License (L).