From: Kennedy Clark Date: Mon, 29 Dec 2008 00:58:25 +0000 (+0000) Subject: Misc updates to adjust Parts 8 & 9 and update their final tarball code X-Git-Tag: v5.8005~235 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=028b4e1a01c7fee31bcee0c3b44cb12958b61222 Misc updates to adjust Parts 8 & 9 and update their final tarball code --- diff --git a/lib/Catalyst/Manual/Tutorial.pod b/lib/Catalyst/Manual/Tutorial.pod index c1bf5f2..7793f03 100644 --- a/lib/Catalyst/Manual/Tutorial.pod +++ b/lib/Catalyst/Manual/Tutorial.pod @@ -58,8 +58,9 @@ L =back -A tarball of the final application is available at -L. +Tarballs for the final code for each part of the tutorial is available +at +L. =head1 Detailed Table of Contents diff --git a/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod b/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod index f5c5f4d..81f59be 100644 --- a/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod +++ b/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod @@ -83,6 +83,10 @@ required by C: libregexp-copy-perl libregexp-common-perl libyaml-syck-perl libparams-util-perl \ libcrypt-des-perl libcaptcha-recaptcha-perl libcrypt-cbc-perl \ libreadonly-xs-perl libmoose-perl libregexp-assemble-perl + + ... + + sudo apt-get clean Then use the following command to install directly from CPAN the modules that aren't available as Ubuntu/Debian packages via C: @@ -91,6 +95,13 @@ that aren't available as Ubuntu/Debian packages via C: boolean Test::MockTime DateTime::Format::Natural HTML::FormFu \ Catalyst::Component::InstancePerContext Catalyst::Controller::HTML::FormFu \ HTML::FormFu::Model::DBIC + + ... + + Is it OK to try to connect to the Internet? [yes] yes + + ... + B If you are following along with the Ubuntu LiveCD, you might want to make sure you still have adequate free disk space in the root diff --git a/lib/Catalyst/Manual/Tutorial/Debugging.pod b/lib/Catalyst/Manual/Tutorial/Debugging.pod index 6aef0e7..b03f2a7 100644 --- a/lib/Catalyst/Manual/Tutorial/Debugging.pod +++ b/lib/Catalyst/Manual/Tutorial/Debugging.pod @@ -139,12 +139,12 @@ This will start the interactive debugger and produce output similar to: $ perl -d script/myapp_server.pl - Loading DB routines from perl5db.pl version 1.27 + Loading DB routines from perl5db.pl version 1.3 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. - main::(script/myapp_server.pl:14): my $debug = 0; + main::(script/myapp_server.pl:16): my $debug = 0; DB<1> @@ -158,8 +158,8 @@ in. Once the breakpoint is encountered in the C method, the console session running the development server will drop to the Perl debugger prompt: - MyApp::Controller::Books::list(/home/me/MyApp/script/../lib/MyApp/Controller/Books.pm:40): - 40: $c->stash->{books} = [$c->model('DB::Books')->all]; + MyApp::Controller::Books::list(/home/me/MyApp/script/../lib/MyApp/Controller/Books.pm:48): + 48: $c->stash->{books} = [$c->model('DB::Books')->all]; DB<1> @@ -170,8 +170,8 @@ C into methods/subroutines): DB<1> n SELECT me.id, me.authors, me.title, me.rating FROM books me: - MyApp::Controller::Books::list(/home/me/MyApp/script/../lib/MyApp/Controller/Books.pm:44): - 44: $c->stash->{template} = 'books/list.tt2'; + MyApp::Controller::Books::list(/home/me/MyApp/script/../lib/MyApp/Controller/Books.pm:53): + 53: $c->stash->{template} = 'books/list.tt2'; DB<1> @@ -185,15 +185,11 @@ Next, list the methods available on our C model: () (0+ (bool - MODIFY_CODE_ATTRIBUTES - _attr_cache - _collapse_result - _construct_object - _count - _result_class_accessor - _result_source_accessor - all - carp + __source_handle_accessor + _add_alias + _build_unique_query + _calculate_score + _collapse_cond DB<2> diff --git a/lib/Catalyst/Manual/Tutorial/Intro.pod b/lib/Catalyst/Manual/Tutorial/Intro.pod index 3ed15c1..828878b 100644 --- a/lib/Catalyst/Manual/Tutorial/Intro.pod +++ b/lib/Catalyst/Manual/Tutorial/Intro.pod @@ -70,11 +70,10 @@ management). You can obtain the code for all the tutorial examples from the catalyst subversion repository by issuing the command: - svn co http://dev.catalyst.perl.org/repos/Catalyst/tags/examples/Tutorial/MyApp/5.7/ CatalystTutorial + svn co http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/ CatalystTutorial -This will download the current code for each tutorial chapter in the -CatalystTutorial directory. Each example application directory has -the same name as the tutorial chapter. +This will download the most recent tarball for each part of the +tutorial into the CatalystTutorial directory on your machine. B area of the Catalyst Subversion repository at L. -B There are a variety of other introductory materials available -through the Catalyst web site and at -L and -L. - =head1 VERSIONS AND CONVENTIONS USED IN THIS TUTORIAL @@ -450,20 +444,14 @@ same. =head1 WHERE TO GET WORKING CODE -Each part of the tutorial has complete code available in the main -Catalyst Subversion repository (see the note at the beginning of each -part for the appropriate svn command to use). Additionally, the final -code through Part 8 of the tutorial is available as a ready-to-run -tarball at -L. -The final code for other parts of the tutorial are available at: -L. - +Each part of the tutorial has complete code available as a tarball in +the main Catalyst Subversion repository (see the note at the beginning +of each part for the appropriate svn command to use). -B You can run the test cases for the final code with the following -commands: +B You can run the test cases for the final code through Part 8 +with the following commands: - wget http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/Final_Tarball/MyApp_Part8.tgz + wget http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/MyApp_Part8.tgz tar zxvf MyApp.tgz cd MyApp CATALYST_DEBUG=0 prove --lib lib t diff --git a/lib/Catalyst/Manual/Tutorial/Testing.pod b/lib/Catalyst/Manual/Tutorial/Testing.pod index 2b771b3..7f55817 100644 --- a/lib/Catalyst/Manual/Tutorial/Testing.pod +++ b/lib/Catalyst/Manual/Tutorial/Testing.pod @@ -77,15 +77,28 @@ directory, enter: $ prove --lib lib t -There will be a lot of output because we have the C<-Debug> flag enabled -in C (see the C tip below for a quick -and easy way to reduce the clutter). Look for lines like this for -errors: +There will be a lot of output because we have the C<-Debug> flag +enabled in C (see the C tip below for +a quick and easy way to reduce the clutter). Look for lines like this +for errors: # Failed test 'Request should succeed' # in t/controller_Books.t at line 8. # Looks like you failed 1 test of 3. +B Depending on the versions of various modules you have +installed, you might get some C warnings -- you can +ignore these. If you are following along in Ubuntu 8.10, you can +prevent them by adding C above line 49 in +C to match the following: + + ... + { no strict qw( refs ); + no warnings; + $argnames = \@{"$class\::BASEARGS"} || [ ]; + } + ... + The redirection used by the Authentication plugins will cause several failures in the default tests. You can fix this by making the following changes: @@ -212,7 +225,7 @@ editor and enter the following: "Check we ARE logged in" ) for $ua1, $ua2; # 'Click' the 'Logout' link (see also 'text_regex' and 'url_regex' options) - $_->follow_link_ok({n => 1}, "Logout via first link on page") for $ua1, $ua2; + $_->follow_link_ok({n => 4}, "Logout via first link on page") for $ua1, $ua2; $_->title_is("Login", "Check for login title") for $ua1, $ua2; $_->content_contains("You need to log in to use this application", "Check we are NOT logged in") for $ua1, $ua2;