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=c1139e656961112465ed226fe93712a9d5ac4b54;hp=31395838337e68a2903a0a690683b0354b9be237;hb=4768184b3b277399116fbd53cae3697a9767fee5;hpb=0abc72edf5636d7f700793f5b700180428102feb diff --git a/lib/Catalyst/Manual/Tutorial/01_Intro.pod b/lib/Catalyst/Manual/Tutorial/01_Intro.pod index 3139583..c1139e6 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. +=head1 QUICK START + +For those who want to get going quickly, here is a short "cookbook-style +recipe" to quickly get you up and running. Although there are many +different ways to get a Catalyst environment going, this tutorial has +been written with and tested against Debian 5 Live CD, using the steps +in this Quick Start. + +If you want, you can follow the directions in this section and then jump +right to L of +the tutorial. However, it would be a good idea to come back and read the +sections below the Quick Start when you have time. Or, continue reading +those other sections for suggestions if you do not wish to use the +Debian 5 Live CD. + + +=over 4 + +=item 1 + +Download the C image from +L. + +=item 2 + +Boot this disk, either in a physical machine, or possibly some sort +of virtual machine (can be a very handy way to practice). + +=item 3 + +Select "C" from the initial boot menu. + +=item 4 + +At the "C" prompt, type: + + sudo aptitude -y install subversion + +=item 5 + +If you want to be able to remotely SSH to this system, set a +password for root: + + sudo passwd + ... + +=item 6 + +Add the "unstable" Debian package repository: + + sudo vi /etc/apt/sources.list + +Add the following line to the bottom of this file: + + deb http://ftp.us.debian.org/debian/ unstable main + +=item 7 + +Install Catalyst and related libraries: + + sudo aptitude update + sudo aptitude -y install sqlite3 libdbd-sqlite3-perl libcatalyst-perl \ + libcatalyst-modules-perl libdbix-class-timestamp-perl \ + libdatetime-format-sqlite-perl libconfig-general-perl \ + libhtml-formfu-model-dbic-perl libterm-readline-perl-perl \ + libdbix-class-encodedcolumn-perl libperl6-junction-perl \ + libtest-pod-perl + sudo aptitude clean + +=item 8 + +Test example code: + + mkdir test + cd test + svn co http://dev.catalystframework.org/repos/Catalyst/trunk/examples/Tutorial/MyApp_Chapter8 + cd MyApp_Chapter8/MyApp + CATALYST_DEBUG=0 prove -wl t + cd + +=back + + =head1 VERSIONS AND CONVENTIONS USED IN THIS TUTORIAL This tutorial was built using the following resources. Please note that you may need to make adjustments for different environments and -versions: +versions (note that trailing zeros in version numbers are not +significant and may get dropped with techniques for viewing them; +for example, Catalyst v5.80020 might show up as 5.8002): =over 4 @@ -199,20 +284,25 @@ Debian 5 (Lenny) =item * -Catalyst v5.80013 +Catalyst v5.80020 (note: may show up as '5.8002' without the trailing zero) =item * -Catalyst::Devel v1.21 +Catalyst::Devel v1.26 =item * -DBIx::Class v0.08112 +DBIx::Class v0.08115 + +=item * + +Catalyst::Model::DBIC::Schema v0.40 =item * Template Toolkit v2.20 + =item * Catalyst Plugins @@ -226,11 +316,11 @@ use. This tutorial has been tested against the following set of plugins: =item * -Catalyst::Plugin::Authentication -- v0.10015 +Catalyst::Plugin::Authentication -- v0.10016 =item * -Catalyst::Plugin::Authorization::Roles -- v0.07 +Catalyst::Plugin::Authorization::Roles -- v0.08 =item * @@ -254,10 +344,14 @@ Catalyst::Plugin::StackTrace -- v0.11 =item * -Catalyst::Plugin::Static::Simple -- v0.25 +Catalyst::Plugin::Static::Simple -- v0.29 =back +=item * + +HTML::FormFu -- v0.06001 + =item * B You can check the versions you have installed with the @@ -325,7 +419,8 @@ hard to guarantee this.> =item * Download one of the ISO files from -L. +L +(the current version at the time this was written was 5.0.3). You can pick any one of the live CD variations will work, but you may wish to consider the following points: @@ -333,7 +428,7 @@ you may wish to consider the following points: =item * -"C" is probably the best all-around +"C" is probably the best all-around option for most people because it includes many extra tools such as the GCC compiler, therefore saving RAM (every package you need to install when running from live CD consumes memory because RAM disk is @@ -344,7 +439,7 @@ should be able to safely ignore these. =item * -"C" is a great option because of +"C" is a great option because of its compact size, but you will probably need approximately 1 GB of RAM in the computer where you will run the tutorial. Because the "standard" live CD comes with with a minimal set of tools, we will @@ -377,9 +472,21 @@ Select "C" from the initial boot menu. =item * -Once the system has booted to a "C" prompt, enter the -following command to add the more current "unstable" package -repository: +Once the system has booted to a "C" prompt, first +install the Subversion client in case you want to check out the +completed chapter example code: + + sudo aptitude -y install subversion + +If you want to be able to remotely SSH to this system, set a +password for root: + + sudo passwd + ... + +Then enter the following command to add the more current "unstable" +package repository so we get the latest versions of Catalyst and +related packages: sudo vi /etc/apt/sources.list @@ -401,8 +508,10 @@ Install Catalyst: sudo aptitude update sudo aptitude -y install sqlite3 libdbd-sqlite3-perl libcatalyst-perl \ libcatalyst-modules-perl libdbix-class-timestamp-perl \ + libdatetime-format-sqlite-perl libconfig-general-perl \ + libhtml-formfu-model-dbic-perl libterm-readline-perl-perl \ libdbix-class-encodedcolumn-perl libperl6-junction-perl \ - libdatetime-format-sqlite-perl libconfig-general-perl + libtest-pod-perl Let it install (normally about a 30 to 90-second operaton) and you are done. (Note the '\' above. Depending on your environment, you might @@ -616,19 +725,17 @@ 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: - 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 + svn co http://dev.catalystframework.org/repos/Catalyst/trunk/examples/Tutorial/MyApp_Chapter8 + cd MyApp_Chapter8/MyApp + 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. +If you wish to include the L section in your tests, +substitute C for C in the URL +above (don't forget to "cd" out of the Ch8 directory if you ran the code above). - 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 --lib lib t + svn co http://dev.catalystframework.org/repos/Catalyst/trunk/examples/Tutorial/MyApp_Chapter9_FormFu + cd MyApp_Chapter9_FormFu/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 @@ -654,5 +761,5 @@ Please report any errors, issues or suggestions to the author. The most recent version of the Catalyst Tutorial can be found at L. -Copyright 2006-2008, Kennedy Clark, under Creative Commons License +Copyright 2006-2010, Kennedy Clark, under Creative Commons License (L).