The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
Changes 04
META.yml 22
inc/Module/AutoInstall.pm 152
inc/Module/Install/AutoInstall.pm 11
inc/Module/Install/Base.pm 11
inc/Module/Install/Can.pm 11
inc/Module/Install/Fetch.pm 11
inc/Module/Install/Include.pm 11
inc/Module/Install/Makefile.pm 5514
inc/Module/Install/Metadata.pm 4117
inc/Module/Install/Win32.pm 11
inc/Module/Install/WriteAll.pm 11
inc/Module/Install.pm 2611
lib/Catalyst/Manual/Actions.pod 11
lib/Catalyst/Manual/CatalystAndMoose.pod 2222
lib/Catalyst/Manual/Cookbook.pod 1833
lib/Catalyst/Manual/Tutorial/01_Intro.pod 11
lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod 1319
lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod 2018
lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod 55
lib/Catalyst/Manual/Tutorial/05_Authentication.pod 147145
lib/Catalyst/Manual/Tutorial/06_Authorization.pod 16
lib/Catalyst/Manual/Tutorial/07_Debugging.pod 22
lib/Catalyst/Manual/Tutorial/08_Testing.pod 250
lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod 22
lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod 1112
lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD.pod 11
lib/Catalyst/Manual/Tutorial/10_Appendices.pod 11
lib/Catalyst/Manual/Tutorial.pod 1313
lib/Catalyst/Manual.pm 22
30 files changed (This is a version diff) 408390
@@ -1,5 +1,9 @@
 Revision history for Catalyst-Manual
 
+5.8005 27 Oct 2010 
+    - Tutorial:
+        - Add DATABASE CONFIG SWITCHING USING MULTIPLE CONFIG FILES section
+        - Critical bugfix on index page.
 5.8004 17 Feb 2010
     - Tutorial:
         - Add foreign key support for SQLite 
@@ -8,7 +8,7 @@ build_requires:
 configure_requires:
   ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 0.930'
+generated_by: 'Module::Install version 0.91'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -21,4 +21,4 @@ no_index:
 resources:
   license: http://dev.perl.org/licenses/
   repository: http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/
-version: 5.8004
+version: 5.8005
@@ -672,20 +672,7 @@ sub _load {
 sub _load_cpan {
     return if $CPAN::VERSION and $CPAN::Config and not @_;
     require CPAN;
-
-    # CPAN-1.82+ adds CPAN::Config::AUTOLOAD to redirect to
-    #    CPAN::HandleConfig->load. CPAN reports that the redirection
-    #    is deprecated in a warning printed at the user.
-
-    # CPAN-1.81 expects CPAN::HandleConfig->load, does not have
-    #   $CPAN::HandleConfig::VERSION but cannot handle
-    #   CPAN::Config->load
-
-    # Which "versions expect CPAN::Config->load?
-
-    if ( $CPAN::HandleConfig::VERSION
-        || CPAN::HandleConfig->can('load')
-    ) {
+    if ( $CPAN::HandleConfig::VERSION ) {
         # Newer versions of CPAN have a HandleConfig module
         CPAN::HandleConfig->load;
     } else {
@@ -815,4 +802,4 @@ END_MAKE
 
 __END__
 
-#line 1069
+#line 1056
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.93';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -4,7 +4,7 @@ package Module::Install::Base;
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.93';
+	$VERSION = '0.91';
 }
 
 # Suspend handler for "redefined" warnings
@@ -9,7 +9,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.93';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.93';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.93';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -7,7 +7,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.93';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -34,17 +34,6 @@ sub prompt {
 	}
 }
 
-# Store a cleaned up version of the MakeMaker version,
-# since we need to behave differently in a variety of
-# ways based on the MM version.
-my $makemaker = eval $ExtUtils::MakeMaker::VERSION;
-
-# If we are passed a param, do a "newer than" comparison.
-# Otherwise, just return the MakeMaker version.
-sub makemaker {
-	( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0
-}
-
 sub makemaker_args {
 	my $self = shift;
 	my $args = ( $self->{makemaker_args} ||= {} );
@@ -55,7 +44,7 @@ sub makemaker_args {
 # For mm args that take multiple space-seperated args,
 # append an argument to the current list.
 sub makemaker_append {
-	my $self = shift;
+	my $self = sShift;
 	my $name = shift;
 	my $args = $self->makemaker_args;
 	$args->{name} = defined $args->{$name}
@@ -118,9 +107,6 @@ sub tests_recursive {
 	%test_dir = ();
 	require File::Find;
 	File::Find::find( \&_wanted_t, $dir );
-	if ( -d 'xt' and ($ENV{RELEASE_TESTING} or $self->author) ) {
-		File::Find::find( \&_wanted_t, 'xt' );
-	}
 	$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
 }
 
@@ -144,13 +130,12 @@ sub write {
 		# an underscore, even though its own version may contain one!
 		# Hence the funny regexp to get rid of it.  See RT #35800
 		# for details.
-		my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
-		$self->build_requires(     'ExtUtils::MakeMaker' => $v );
-		$self->configure_requires( 'ExtUtils::MakeMaker' => $v );
+		$self->build_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+		$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
 	} else {
 		# Allow legacy-compatibility with 5.005 by depending on the
 		# most recent EU:MM that supported 5.005.
-		$self->build_requires(     'ExtUtils::MakeMaker' => 6.42 );
+		$self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
 		$self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
 	}
 
@@ -160,75 +145,49 @@ sub write {
 	$args->{NAME}     = $self->module_name || $self->name;
 	$args->{VERSION}  = $self->version;
 	$args->{NAME}     =~ s/-/::/g;
-	$DB::single = 1;
 	if ( $self->tests ) {
 		$args->{test} = { TESTS => $self->tests };
-	} elsif ( -d 'xt' and ($self->author or $ENV{RELEASE_TESTING}) ) {
-		$args->{test} = {
-			TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ),
-		};
 	}
 	if ( $] >= 5.005 ) {
 		$args->{ABSTRACT} = $self->abstract;
 		$args->{AUTHOR}   = $self->author;
 	}
-	if ( $self->makemaker(6.10) ) {
-		$args->{NO_META}   = 1;
-		#$args->{NO_MYMETA} = 1;
+	if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
+		$args->{NO_META} = 1;
 	}
-	if ( $self->makemaker(6.17) and $self->sign ) {
+	if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
 		$args->{SIGN} = 1;
 	}
 	unless ( $self->is_admin ) {
 		delete $args->{SIGN};
 	}
 
+	# Merge both kinds of requires into prereq_pm
 	my $prereq = ($args->{PREREQ_PM} ||= {});
 	%$prereq = ( %$prereq,
-		map { @$_ } # flatten [module => version]
+		map { @$_ }
 		map { @$_ }
 		grep $_,
-		($self->requires)
+		($self->configure_requires, $self->build_requires, $self->requires)
 	);
 
 	# Remove any reference to perl, PREREQ_PM doesn't support it
 	delete $args->{PREREQ_PM}->{perl};
 
-	# Merge both kinds of requires into BUILD_REQUIRES
-	my $build_prereq = ($args->{BUILD_REQUIRES} ||= {});
-	%$build_prereq = ( %$build_prereq,
-		map { @$_ } # flatten [module => version]
-		map { @$_ }
-		grep $_,
-		($self->configure_requires, $self->build_requires)
-	);
-
-	# Remove any reference to perl, BUILD_REQUIRES doesn't support it
-	delete $args->{BUILD_REQUIRES}->{perl};
-
-	# Delete bundled dists from prereq_pm
+	# merge both kinds of requires into prereq_pm
 	my $subdirs = ($args->{DIR} ||= []);
 	if ($self->bundles) {
 		foreach my $bundle (@{ $self->bundles }) {
 			my ($file, $dir) = @$bundle;
 			push @$subdirs, $dir if -d $dir;
-			delete $build_prereq->{$file}; #Delete from build prereqs only
+			delete $prereq->{$file};
 		}
 	}
 
-	unless ( $self->makemaker('6.55_03') ) {
-		%$prereq = (%$prereq,%$build_prereq);
-		delete $args->{BUILD_REQUIRES};
-	}
-
 	if ( my $perl_version = $self->perl_version ) {
 		eval "use $perl_version; 1"
 			or die "ERROR: perl: Version $] is installed, "
 			. "but we need version >= $perl_version";
-
-		if ( $self->makemaker(6.48) ) {
-			$args->{MIN_PERL_VERSION} = $perl_version;
-		}
 	}
 
 	$args->{INSTALLDIRS} = $self->installdirs;
@@ -306,4 +265,4 @@ sub postamble {
 
 __END__
 
-#line 435
+#line 394
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.93';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -230,8 +230,6 @@ sub all_from {
 		die("The path '$file' does not exist, or is not a file");
 	}
 
-	$self->{values}{all_from} = $file;
-
 	# Some methods pull from POD instead of code.
 	# If there is a matching .pod, use that instead
 	my $pod = $file;
@@ -387,10 +385,11 @@ sub name_from {
 	}
 }
 
-sub _extract_perl_version {
+sub perl_version_from {
+	my $self = shift;
 	if (
-		$_[0] =~ m/
-		^\s*
+		Module::Install::_read($_[0]) =~ m/
+		^
 		(?:use|require) \s*
 		v?
 		([\d_\.]+)
@@ -399,16 +398,6 @@ sub _extract_perl_version {
 	) {
 		my $perl_version = $1;
 		$perl_version =~ s{_}{}g;
-		return $perl_version;
-	} else {
-		return;
-	}
-}
-
-sub perl_version_from {
-	my $self = shift;
-	my $perl_version=_extract_perl_version(Module::Install::_read($_[0]));
-	if ($perl_version) {
 		$self->perl_version($perl_version);
 	} else {
 		warn "Cannot determine perl version info from $_[0]\n";
@@ -436,12 +425,13 @@ sub author_from {
 	}
 }
 
-sub _extract_license {
+sub license_from {
+	my $self = shift;
 	if (
-		$_[0] =~ m/
+		Module::Install::_read($_[0]) =~ m/
 		(
 			=head \d \s+
-			(?:licen[cs]e|licensing|copyrights?|legal)\b
+			(?:licen[cs]e|licensing|copyright|legal)\b
 			.*?
 		)
 		(=head\\d.*|=cut.*|)
@@ -449,9 +439,7 @@ sub _extract_license {
 	/ixms ) {
 		my $license_text = $1;
 		my @phrases      = (
-			'under the same (?:terms|license) as (?:perl|the perl programming language)' => 'perl', 1,
-			'under the terms of (?:perl|the perl programming language) itself' => 'perl', 1,
-			'Artistic and GPL'                   => 'perl',        1,
+			'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
 			'GNU general public license'         => 'gpl',         1,
 			'GNU public license'                 => 'gpl',         1,
 			'GNU lesser general public license'  => 'lgpl',        1,
@@ -468,32 +456,20 @@ sub _extract_license {
 			'proprietary'                        => 'proprietary', 0,
 		);
 		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
-			$pattern =~ s#\s+#\\s+#gs;
+			$pattern =~ s{\s+}{\\s+}g;
 			if ( $license_text =~ /\b$pattern\b/i ) {
-			        return $license;
+				$self->license($license);
+				return 1;
 			}
 		}
-	} else {
-	        return;
 	}
-}
 
-sub license_from {
-	my $self = shift;
-	if (my $license=_extract_license(Module::Install::_read($_[0]))) {
-		$self->license($license);
-	} else {
-		warn "Cannot determine license info from $_[0]\n";
-		return 'unknown';
-	}
+	warn "Cannot determine license info from $_[0]\n";
+	return 'unknown';
 }
 
 sub _extract_bugtracker {
-	my @links   = $_[0] =~ m#L<(
-	 \Qhttp://rt.cpan.org/\E[^>]+|
-	 \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
-	 \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
-	 )>#gx;
+	my @links   = $_[0] =~ m#L<(\Qhttp://rt.cpan.org/\E[^>]+)>#g;
 	my %links;
 	@links{@links}=();
 	@links=keys %links;
@@ -509,7 +485,7 @@ sub bugtracker_from {
 		return 0;
 	}
 	if ( @links > 1 ) {
-		warn "Found more than one bugtracker link in $_[0]\n";
+		warn "Found more than on rt.cpan.org link in $_[0]\n";
 		return 0;
 	}
 
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.93';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.93';;
+	$VERSION = '0.91';;
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }
@@ -28,7 +28,7 @@ BEGIN {
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.93';
+	$VERSION = '0.91';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -348,24 +348,17 @@ sub _caller {
 	return $call;
 }
 
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _read {
 	local *FH;
-	open( FH, '<', $_[0] ) or die "open($_[0]): $!";
-	my $string = do { local $/; <FH> };
-	close FH or die "close($_[0]): $!";
-	return $string;
-}
-END_NEW
-sub _read {
-	local *FH;
-	open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
+	if ( $] >= 5.006 ) {
+		open( FH, '<', $_[0] ) or die "open($_[0]): $!";
+	} else {
+		open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
+	}
 	my $string = do { local $/; <FH> };
 	close FH or die "close($_[0]): $!";
 	return $string;
 }
-END_OLD
 
 sub _readperl {
 	my $string = Module::Install::_read($_[0]);
@@ -386,26 +379,18 @@ sub _readpod {
 	return $string;
 }
 
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _write {
 	local *FH;
-	open( FH, '>', $_[0] ) or die "open($_[0]): $!";
-	foreach ( 1 .. $#_ ) {
-		print FH $_[$_] or die "print($_[0]): $!";
+	if ( $] >= 5.006 ) {
+		open( FH, '>', $_[0] ) or die "open($_[0]): $!";
+	} else {
+		open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
 	}
-	close FH or die "close($_[0]): $!";
-}
-END_NEW
-sub _write {
-	local *FH;
-	open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
 	foreach ( 1 .. $#_ ) {
 		print FH $_[$_] or die "print($_[0]): $!";
 	}
 	close FH or die "close($_[0]): $!";
 }
-END_OLD
 
 # _version is for processing module versions (eg, 1.03_05) not
 # Perl versions (eg, 5.8.1).
@@ -442,4 +427,4 @@ sub _CLASS ($) {
 
 1;
 
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2009 Adam Kennedy.
@@ -46,7 +46,7 @@ the Action class:
     $c->stash->{what} = 'world';
   };
 
-  after 'extecute' => sub {
+  after 'execute' => sub {
       my ( $self, $controller, $c, $test ) = @_;
       $c->stash->{foo} = 'bar';
   };
@@ -122,39 +122,39 @@ It is possible to use roles to apply method modifiers on controller actions
 from 5.80003 onwards, or use modifiers in your controller classes
 themselves. For example
 
-	package MyApp::Controller::Foo;
-	use Moose;
-	use namespace::autoclean;
-	BEGIN { extends 'Catalyst::Controller' };
-	
+    package MyApp::Controller::Foo;
+    use Moose;
+    use namespace::autoclean;
+    BEGIN { extends 'Catalyst::Controller' };
+    
     sub foo : Local { 
-	    my ($self, $c) = @_;
-	    $c->res->body('Hello ');
-	}
-	after foo => sub {
-		my ($self, $c) = @_;
-		$c->res->body($c->res->body . 'World');
-	};
-	
+        my ($self, $c) = @_;
+        $c->res->body('Hello ');
+    }
+    after foo => sub {
+        my ($self, $c) = @_;
+        $c->res->body($c->res->body . 'World');
+    };
+    
 It is possible to have action methods with attributes inside Moose roles, using
 L<MooseX::MethodAttributes>, example:
 
     package MyApp::ControllerRole;
-    use MooseX::MethodAttribute::Role;
+    use MooseX::MethodAttributes::Role;
     use namespace::autoclean;
-
+    
     sub foo : Local {
         my ($self, $c) = @_;
         ...
     }
+    
+    package MyApp::Controller::Foo;
+    use Moose;
+    use namespace::autoclean;
+    BEGIN { extends 'Catalyst::Controller' };
+    
+    with 'MyApp::ControllerRole';
 
-	package MyApp::Controller::Foo;
-   	use Moose;
-   	use namespace::autoclean;
-   	BEGIN { extends 'Catalyst::Controller' };
-
-	with 'MyApp::ControllerRole';
-	
 =head1 AUTHORS
 
 Catalyst Contributors, see Catalyst.pm
@@ -33,9 +33,12 @@ to go into this C<end> method; see L<Catalyst::Plugin::FillInForm>).
 
         if ( scalar @{ $c->error } ) {
             $c->stash->{errors}   = $c->error;
+            for my $error ( @{ $c->error } ) {
+                $c->log->error($error);
+            }
             $c->stash->{template} = 'errors.tt';
             $c->forward('MyApp::View::TT');
-            $c->error(0);
+            $c->clear_errors;
         }
 
         return 1 if $c->response->status =~ /^3\d\d$/;
@@ -133,7 +136,7 @@ reference.
   sub add_item : Local {
      my ( $self, $c ) = @_;
 
-     my $item_id = $c->req->param("item");
+     my $item_id = $c->req->params->{item};
 
      push @{ $c->session->{items} }, $item_id;
 
@@ -373,22 +376,22 @@ the user is a member.
                  },
              },
          },
-     },   
+     },
   );
 
   package MyApp::Controller::Root;
   use Moose;
   use namespace::autoclean;
-  
+
   BEGIN { extends 'Catalyst::Controller' }
-  
+
   __PACKAGE__->config(namespace => '');
-  
+
   sub login : Local {
      my ($self, $c) = @_;
 
-     if (    my $user = $c->req->param("user")
-         and my $password = $c->req->param("password") )
+     if ( my $user = $c->req->params->{user}
+         and my $password = $c->req->param->{password} )
      {
          if ( $c->authenticate( username => $user, password => $password ) ) {
               $c->res->body( "hello " . $c->user->name );
@@ -454,7 +457,7 @@ pretty nasti!). For example:
     sub feed_moose : Local {
         my ( $self, $c ) = @_;
 
-        $c->model( "Moose" )->eat( $c->req->param("food") );
+        $c->model( "Moose" )->eat( $c->req->params->{food} );
     }
 
 With this action, anyone can just come into the moose cage and feed
@@ -476,7 +479,7 @@ And now our action should look like this:
         my ( $self, $c ) = @_;
 
         if ( $c->check_roles( "moose_feeder" ) ) {
-            $c->model( "Moose" )->eat( $c->req->param("food") );
+            $c->model( "Moose" )->eat( $c->req->params->{food} );
         } else {
             $c->stash->{error} = "unauthorized";
         }
@@ -745,7 +748,7 @@ display your data; you can choose to generate HTML, PDF files, or plain
 text if you wanted.
 
 Most Catalyst applications use a template system to generate their HTML,
-and though there are several template systems available, 
+and though there are several template systems available,
 L<Template Toolkit|Template> is probably the most popular.
 
 Once again, the Catalyst developers have done all the hard work, and
@@ -1481,7 +1484,7 @@ information on passing arguments via C<forward>.)
   use base qw/Catalyst::Controller/;
 
   sub key1 : Chained('/')
-  
+
 =head2 Extending RenderView (formerly DefaultEnd)
 
 The recommended approach for an C<end> action is to use
@@ -1512,7 +1515,7 @@ you can set it up like this:
       # do stuff here
     }
 
-  
+
 
 =head1 Deployment
 
@@ -1521,15 +1524,15 @@ including web server engines and tips to improve application efficiency.
 
 =head2 mod_perl Deployment
 
-mod_perl is the best solution for many applications, but we'll list some pros
-and cons so you can decide for yourself.  The other production deployment
-option is FastCGI, for which see below.
+mod_perl is not the best solution for many applications, but we'll list some
+pros and cons so you can decide for yourself. The other (recommended)
+deployment option is FastCGI, for which see below.
 
 =head3 Pros
 
 =head4 Speed
 
-mod_perl is very fast and your app will benefit from being loaded in memory
+mod_perl is fast and your app will be loaded in memory
 within each Apache process.
 
 =head4 Shared memory for multiple apps
@@ -1560,6 +1563,14 @@ C<ErrorDocument 502> page to report that your app is down for maintenance.
 It is not possible to run two different versions of the same application in
 the same Apache instance because the namespaces will collide.
 
+=head4 Cannot run different versions of libraries.
+
+If you have two differnet applications which run on the same machine,
+which need two different versions of a library then the only way to do
+this is to have per-vhost perl interpreters (with different library paths).
+This is entirely possible, but nullifies all the memory sharing benefits that
+you get from having multiple applications sharing the same interpreter.
+
 =head4 Setup
 
 Now that we have that out of the way, let's talk about setting up mod_perl
@@ -1758,7 +1769,11 @@ than when using mod_perl.
 
 mod_fastcgi for Apache is a third party module, and can be found at
 L<http://www.fastcgi.com/>.  It is also packaged in many distributions,
-for example, libapache2-mod-fastcgi in Debian.
+for example, libapache2-mod-fastcgi in Debian. You will also need to install
+the L<FCGI> module from cpan.
+
+Important Note! If you experience difficulty properly rendering pages,
+try disabling Apache's mod_deflate (Deflate Module), e.g. 'a2dismod deflate'.
 
 =head4 2. Configure your application
 
@@ -761,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<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -190,11 +190,11 @@ previous step):
 
 B<Note>: The "-r" argument enables reloading on code changes so you 
 don't have to stop and start the server when you update code. See 
-C<perldoc script/hello_server.pl> for additional options you might find 
-helpful. Most of the rest of the tutorial will assume that you are using 
-"-r" when you start the development server, but feel free to manually 
-start and stop it (use C<Ctrl-C> to break out of the dev server) if you 
-prefer. 
+C<perldoc script/hello_server.pl> or C<script/hello_server.pl --help>
+for additional options you might find helpful. Most of the rest of the
+tutorial will assume that you are using "-r" when you start the development
+server, but feel free to manually start and stop it (use C<Ctrl-C> to
+breakout of the dev server) if you prefer. 
 
     $ script/hello_server.pl -r
     [debug] Debug messages enabled
@@ -319,6 +319,10 @@ file:
         $c->response->body("Hello, World!");
     }
 
+Once you restart the server, you will need to use the new address
+L<http://localhost:3000/hello> instead of L<http://localhost:3000/> to see the
+changes.
+
 B<TIP>: See Appendix 1 for tips on removing the leading spaces when
 cutting and pasting example code from POD-based documents.
 
@@ -367,9 +371,9 @@ Toolkit Template template file), the actual templates go under the
 
 To create a TT view, run:
 
-    $ script/hello_create.pl view TT TT
+    $ script/hello_create.pl view HTML TT
 
-This creates the C<lib/Hello/View/TT.pm> module, which is a subclass of 
+This creates the C<lib/Hello/View/HTML.pm> module, which is a subclass of 
 C<Catalyst::View::TT>. 
 
 =over 4
@@ -380,9 +384,11 @@ The "view" keyword tells the create script that you are creating a view.
 
 =item *
 
-The first "TT" tells the script to name the View module "TT.pm", which is a
-commonly used name for TT views.  (You can name it anything you want, such as
-"HTML.pm".)
+The first argument "HTML" tells the script to name the View module "HTML.pm",
+which is a commonly used name for TT views.  You can name it anything you want,
+such as "MyView.pm". If you have more than one view, be sure to set the
+default_view in Hello.pm (See L<Catalyst::View::TT|Catalyst::View::TT> for more
+details on setting this).
 
 =item *
 
@@ -391,10 +397,10 @@ indicating that you want to a Template Toolkit view.
 
 =back
 
-If you look at C<lib/Hello/View/TT.pm> you will find that it only 
+If you look at C<lib/Hello/View/HTML.pm> you will find that it only 
 contains a config statement to set the TT extension to ".tt".
 
-Now that the TT.pm "View" exists, Catalyst will autodiscover it and be 
+Now that the HTML.pm "View" exists, Catalyst will autodiscover it and be 
 able to use it to display the view templates using the "process" 
 method that it inherits from the C<Catalyst::View::TT> class.
 
@@ -529,5 +535,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark & Gerda Shank, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -436,22 +436,20 @@ but its use is now deprecated.
 Enter the following command to enable the C<TT> style of view
 rendering for this tutorial:
 
-    $ script/myapp_create.pl view TT TT
+    $ script/myapp_create.pl view HTML TT
      exists "/home/me/MyApp/script/../lib/MyApp/View"
      exists "/home/me/MyApp/script/../t"
-     created "/home/me/MyApp/script/../lib/MyApp/View/TT.pm"
-     created "/home/me/MyApp/script/../t/view_TT.t"
-
-This simply creates a view called C<TT> (the second 'TT' argument) in 
-a file called C<TT.pm> (the first 'TT' argument). It is now up to you 
-to decide how you want to structure your view layout.  For the 
-tutorial, we will start with a very simple TT template to initially 
-demonstrate the concepts, but quickly migrate to a more typical 
-"wrapper page" type of configuration (where the "wrapper" controls the 
-overall "look and feel" of your site from a single file or set of 
-files).
-
-Edit C<lib/MyApp/View/TT.pm> and you should see that the default
+     created "/home/me/MyApp/script/../lib/MyApp/View/HTML.pm"
+     created "/home/me/MyApp/script/../t/view_HTML.t"
+
+This simply creates a view called C<HTML> in a file called C<HTML.pm> (the first
+argument). It is now up to you to decide how you want to structure your view
+layout.  For the tutorial, we will start with a very simple TT template to
+initially demonstrate the concepts, but quickly migrate to a more typical
+"wrapper page" type of configuration (where the "wrapper" controls the overall
+"look and feel" of your site from a single file or set of files).
+
+Edit C<lib/MyApp/View/HTML.pm> and you should see that the default
 contents contains something similar to the following:
 
     __PACKAGE__->config(TEMPLATE_EXTENSION => '.tt');
@@ -936,7 +934,7 @@ display something like:
     | MyApp::Model::DB::Author                                        | class    |
     | MyApp::Model::DB::Book                                          | class    |
     | MyApp::Model::DB::BookAuthor                                    | class    |
-    | MyApp::View::TT                                                 | instance |
+    | MyApp::View::HTML                                               | instance |
     '-----------------------------------------------------------------+----------'
     
     [debug] Loaded Private actions:
@@ -1018,12 +1016,12 @@ will appear across your entire site/application instead of having to
 edit many individual files.
 
 
-=head2 Configure TT.pm For The Wrapper
+=head2 Configure HTML.pm For The Wrapper
 
 In order to create a wrapper, you must first edit your TT view and
 tell it where to find your wrapper file. 
 
-Edit you TT view in C<lib/MyApp/View/TT.pm> and change it to match the 
+Edit you TT view in C<lib/MyApp/View/HTML.pm> and change it to match the 
 following:
 
     __PACKAGE__->config(
@@ -1176,7 +1174,7 @@ provide lots of high-quality CSS functionality.
 Hit "Reload" in your web browser and you should now see a formatted 
 version of our basic book list. (Again, the development server should 
 have automatically restarted when you made changes to 
-C<lib/MyApp/View/TT.pm>. If you are not using the "-r" option, you will 
+C<lib/MyApp/View/HTML.pm>. If you are not using the "-r" option, you will 
 need to hit C<Ctrl-C> and manually restart it. Also note that the 
 development server does I<NOT> need to restart for changes to the TT and 
 static files we created and edited in the C<root> directory -- those 
@@ -1585,7 +1583,7 @@ statement in C<sub list> in C<lib/MyApp/Controller/Books.pm>:
     $c->stash(template => 'books/list.tt2');
 
 Then delete the C<TEMPLATE_EXTENSION> line in
-C<lib/MyApp/View/TT.pm>.
+C<lib/MyApp/View/HTML.pm>.
 
 Check the L<http://localhost:3000/books/list> URL in your browser.
 It should look the same manner as with earlier sections.
@@ -1599,5 +1597,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -938,8 +938,8 @@ Let's add two columns to our existing C<books> table to track when
 each book was added and when each book is updated:
 
     $ sqlite3 myapp.db
-    sqlite> ALTER TABLE book ADD created INTEGER;
-    sqlite> ALTER TABLE book ADD updated INTEGER;
+    sqlite> ALTER TABLE book ADD created TIMESTAMP;
+    sqlite> ALTER TABLE book ADD updated TIMESTAMP;
     sqlite> UPDATE book SET created = DATETIME('NOW'), updated = DATETIME('NOW');
     sqlite> SELECT * FROM book;
     1|CCSP SNRS Exam Certification Guide|5|2010-02-16 04:15:45|2010-02-16 04:15:45
@@ -990,9 +990,9 @@ B<above> the C<1;> on the last line):
     #
     __PACKAGE__->add_columns(
         "created",
-        { data_type => 'datetime', set_on_create => 1 },
+        { data_type => 'timestamp', set_on_create => 1 },
         "updated",
-        { data_type => 'datetime', set_on_create => 1, set_on_update => 1 },
+        { data_type => 'timestamp', set_on_create => 1, set_on_update => 1 },
     );
 
 This will override the definition for these fields that Schema::Loader 
@@ -1384,5 +1384,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -82,10 +82,10 @@ authorization section, Chapter 6).  Create a new SQL script file by opening
 C<myapp02.sql> in your editor and insert:
 
     --
-    -- Add user and role tables, along with a many-to-many join table
+    -- Add users and role tables, along with a many-to-many join table
     --
     PRAGMA foreign_keys = ON;
-    CREATE TABLE user (
+    CREATE TABLE users (
             id            INTEGER PRIMARY KEY,
             username      TEXT,
             password      TEXT,
@@ -106,9 +106,9 @@ C<myapp02.sql> in your editor and insert:
     --
     -- Load up some initial test data
     --
-    INSERT INTO user VALUES (1, 'test01', 'mypass', 't01@na.com', 'Joe',  'Blow', 1);
-    INSERT INTO user VALUES (2, 'test02', 'mypass', 't02@na.com', 'Jane', 'Doe',  1);
-    INSERT INTO user VALUES (3, 'test03', 'mypass', 't03@na.com', 'No',   'Go',   0);
+    INSERT INTO users VALUES (1, 'test01', 'mypass', 't01@na.com', 'Joe',  'Blow', 1);
+    INSERT INTO users VALUES (2, 'test02', 'mypass', 't02@na.com', 'Jane', 'Doe',  1);
+    INSERT INTO users VALUES (3, 'test03', 'mypass', 't03@na.com', 'No',   'Go',   0);
     INSERT INTO role VALUES (1, 'user');
     INSERT INTO role VALUES (2, 'admin');
     INSERT INTO user_role VALUES (1, 1);
@@ -146,19 +146,19 @@ files, those changes would have only been written above the C<# DO NOT
 MODIFY THIS OR ANYTHING ABOVE!> comment and your hand-edited
 enhancements would have been preserved.
 
-Speaking of "hand-editted enhancements," we should now add the 
-C<many_to_many> relationship information to the User Result Source file. 
-As with the Book, BookAuthor, and Author files in 
-L<Chapter 3|Catalyst::Manual::Tutorial::03_MoreCatalystBasics>, 
-L<DBIx::Class::Schema::Loader|DBIx::Class::Schema::Loader> has 
-automatically created the C<has_many> and C<belongs_to> relationships 
-for the new User, UserRole, and Role tables. However, as a convenience 
-for mapping Users to their assigned roles (see 
-L<Chapter 6|Catalyst::Manual::Tutorial::06_Authorization>), we will 
-also manually add a C<many_to_many> relationship. Edit 
-C<lib/MyApp/Schema/Result/User.pm> add the following information between 
-the C<# DO NOT MODIFY THIS OR ANYTHING ABOVE!> comment and the closing 
-C<1;>: 
+Speaking of "hand-editted enhancements," we should now add the
+C<many_to_many> relationship information to the User Result Source file.
+As with the Book, BookAuthor, and Author files in
+L<Chapter 3|Catalyst::Manual::Tutorial::03_MoreCatalystBasics>,
+L<DBIx::Class::Schema::Loader|DBIx::Class::Schema::Loader> has
+automatically created the C<has_many> and C<belongs_to> relationships
+for the new User, UserRole, and Role tables. However, as a convenience
+for mapping Users to their assigned roles (see
+L<Chapter 6|Catalyst::Manual::Tutorial::06_Authorization>), we will
+also manually add a C<many_to_many> relationship. Edit
+C<lib/MyApp/Schema/Result/User.pm> add the following information between
+the C<# DO NOT MODIFY THIS OR ANYTHING ABOVE!> comment and the closing
+C<1;>:
 
     # many_to_many():
     #   args:
@@ -168,12 +168,12 @@ C<1;>:
     #   You must already have the has_many() defined to use a many_to_many().
     __PACKAGE__->many_to_many(roles => 'user_roles', 'role');
 
-The code for this update is obviously very similar to the edits we made 
-to the C<Book> and C<Author> classes created in Chapter 3 with one 
-exception: we only defined the C<many_to_many> relationship in one 
-direction. Whereas we felt that we would want to map Authors to Books 
-B<AND> Books to Authors, here we are only adding the convenience 
-C<many_to_many> in the Users to Roles direction. 
+The code for this update is obviously very similar to the edits we made
+to the C<Book> and C<Author> classes created in Chapter 3 with one
+exception: we only defined the C<many_to_many> relationship in one
+direction. Whereas we felt that we would want to map Authors to Books
+B<AND> Books to Authors, here we are only adding the convenience
+C<many_to_many> in the Users to Roles direction.
 
 Note that we do not need to make any change to the
 C<lib/MyApp/Schema.pm> schema file.  It simply tells DBIC to load all
@@ -184,13 +184,13 @@ new table information.
 
 =head2 Sanity-Check of the Development Server Reload
 
-We aren't ready to try out the authentication just yet; we only want to 
-do a quick check to be sure our model loads correctly. Assuming that you 
-are following along and using the "-r" option on C<myapp_server.pl>, 
-then the development server should automatically reload (if not, press 
-C<Ctrl-C> to break out of the server if it's running and then enter 
-C<script/myapp_server.pl> to start it). Look for the three new model 
-objects in the startup debug output: 
+We aren't ready to try out the authentication just yet; we only want to
+do a quick check to be sure our model loads correctly. Assuming that you
+are following along and using the "-r" option on C<myapp_server.pl>,
+then the development server should automatically reload (if not, press
+C<Ctrl-C> to break out of the server if it's running and then enter
+C<script/myapp_server.pl> to start it). Look for the three new model
+objects in the startup debug output:
 
     ...
      .-------------------------------------------------------------------+----------.
@@ -205,7 +205,7 @@ objects in the startup debug output:
     | MyApp::Model::DB::Role                                            | class    |
     | MyApp::Model::DB::User                                            | class    |
     | MyApp::Model::DB::UserRole                                        | class    |
-    | MyApp::View::TT                                                   | instance |
+    | MyApp::View::HTML                                                 | instance |
     '-------------------------------------------------------------------+----------'
     ...
 
@@ -223,11 +223,11 @@ C<StackTrace> is new):
         -Debug
         ConfigLoader
         Static::Simple
-    
+
         StackTrace
-    
+
         Authentication
-    
+
         Session
         Session::Store::FastMmap
         Session::State::Cookie
@@ -273,9 +273,9 @@ backed session store).
 
 There are a variety of ways to provide configuration information to
 L<Catalyst::Plugin::Authentication|Catalyst::Plugin::Authentication>.
-Here we will use 
+Here we will use
 L<Catalyst::Authentication::Realm::SimpleDB|Catalyst::Authentication::Realm::SimpleDB>
-because it automatically sets a reasonable set of defaults for us. Open 
+because it automatically sets a reasonable set of defaults for us. Open
 C<lib/MyApp.pm> and place the following text above the call to
 C<__PACKAGE__-E<gt>setup();>:
 
@@ -288,14 +288,14 @@ C<__PACKAGE__-E<gt>setup();>:
             },
         };
 
-We could have placed this configuration in C<myapp.conf>, but placing 
-it in C<lib/MyApp.pm> is probably a better place since it's not likely 
-something that users of your application will want to change during 
-deployment (or you could use a mixture: leave C<class> and 
-C<user_model> defined in C<lib/MyApp.pm> as we show above, but place 
-C<password_type> in C<myapp.conf> to allow the type of password to be 
-easily modified during deployment).  We will stick with putting 
-all of the authentication-related configuration in C<lib/MyApp.pm> 
+We could have placed this configuration in C<myapp.conf>, but placing
+it in C<lib/MyApp.pm> is probably a better place since it's not likely
+something that users of your application will want to change during
+deployment (or you could use a mixture: leave C<class> and
+C<user_model> defined in C<lib/MyApp.pm> as we show above, but place
+C<password_type> in C<myapp.conf> to allow the type of password to be
+easily modified during deployment).  We will stick with putting
+all of the authentication-related configuration in C<lib/MyApp.pm>
 for the tutorial, but if you wish to use C<myapp.conf>, just convert
 to the following code:
 
@@ -307,23 +307,23 @@ to the following code:
         </default>
     </Plugin::Authentication>
 
-B<TIP:> Here is a short script that will dump the contents of 
+B<TIP:> Here is a short script that will dump the contents of
 C<MyApp->config> to L<Config::General|Config::General> format in
 C<myapp.conf>:
 
-    $ CATALYST_DEBUG=0 perl -Ilib -e 'use MyApp; use Config::General; 
+    $ CATALYST_DEBUG=0 perl -Ilib -e 'use MyApp; use Config::General;
         Config::General->new->save_file("myapp.conf", MyApp->config);'
 
 B<HOWEVER>, if you try out the command above, be sure to delete the
 "myapp.conf" command.  Otherwise, you will wind up with duplicate
 configurations.
 
-B<NOTE:> Because we are using SimpleDB along with a database layout 
+B<NOTE:> Because we are using SimpleDB along with a database layout
 that complies with its default assumptions: we don't need to specify
 the names of the columns where our username and password information
 is stored (hence, the "Simple" part of "SimpleDB").  That being said,
 SimpleDB lets you specify that type of information if you need to.
-Take a look at 
+Take a look at
 C<Catalyst::Authentication::Realm::SimpleDB|Catalyst::Authentication::Realm::SimpleDB>
 for details.
 
@@ -347,18 +347,18 @@ inserted by the helpers when we created the Login controller above,
 and update the definition of C<sub index> to match:
 
     =head2 index
-    
+
     Login logic
-    
+
     =cut
-    
+
     sub index :Path :Args(0) {
         my ($self, $c) = @_;
-    
+
         # Get the username and password from form
         my $username = $c->request->params->{username};
         my $password = $c->request->params->{password};
-    
+
         # If the username and password values were found in form
         if ($username && $password) {
             # Attempt to log the user in
@@ -376,12 +376,12 @@ and update the definition of C<sub index> to match:
             # Set an error message
             $c->stash(error_msg => "Empty username or password.");
         }
-    
+
         # If either of above don't work out, send to the login page
         $c->stash(template => 'login.tt2');
     }
 
-Be sure to remove the 
+Be sure to remove the
 C<$c-E<gt>response-E<gt>body('Matched MyApp::Controller::Login in Login.');>
 line of the C<sub index>.
 
@@ -413,17 +413,17 @@ Next, update the corresponding method in
 C<lib/MyApp/Controller/Logout.pm> to match:
 
     =head2 index
-    
+
     Logout logic
-    
+
     =cut
-    
+
     sub index :Path :Args(0) {
         my ($self, $c) = @_;
-    
+
         # Clear the user's state
         $c->logout;
-    
+
         # Send the user to the starting point
         $c->response->redirect($c->uri_for('/'));
     }
@@ -438,7 +438,7 @@ line of the C<sub index>.
 Create a login form by opening C<root/src/login.tt2> and inserting:
 
     [% META title = 'Login' %]
-    
+
     <!-- Login form -->
     <form method="post" action="[% c.uri_for('/login') %]">
       <table>
@@ -462,24 +462,24 @@ Create a login form by opening C<root/src/login.tt2> and inserting:
 We need something that provides enforcement for the authentication
 mechanism -- a I<global> mechanism that prevents users who have not
 passed authentication from reaching any pages except the login page.
-This is generally done via an C<auto> action/method in 
+This is generally done via an C<auto> action/method in
 C<lib/MyApp/Controller/Root.pm>.
 
 Edit the existing C<lib/MyApp/Controller/Root.pm> class file and insert
 the following method:
 
     =head2 auto
-    
+
     Check if there is a user and, if not, forward to login page
-    
+
     =cut
-    
+
     # Note that 'auto' runs after 'begin' but before your actions and that
     # 'auto's "chain" (all from application path to most specific class are run)
     # See the 'Actions' section of 'Catalyst::Manual::Intro' for more info.
     sub auto :Private {
         my ($self, $c) = @_;
-    
+
         # Allow unauthenticated users to reach the login page.  This
         # allows unauthenticated users to reach any action in the Login
         # controller.  To lock it down to a single action, we could use:
@@ -489,7 +489,7 @@ the following method:
         if ($c->controller eq $c->controller('Login')) {
             return 1;
         }
-    
+
         # If a user doesn't exist, force login
         if (!$c->user_exists) {
             # Dump a log message to the development server debug output
@@ -499,7 +499,7 @@ the following method:
             # Return 0 to cancel 'post-auto' processing and prevent use of application
             return 0;
         }
-    
+
         # User found, so return 1 to continue with processing after this 'auto'
         return 1;
     }
@@ -551,15 +551,15 @@ use of an IF-THEN-ELSE construct in TT).
 
 =head2 Try Out Authentication
 
-The development server should have reloaded each time we edited one of 
-the Controllers in the previous section. Now trying going to 
-L<http://localhost:3000/books/list> and you should be redirected to the 
-login page, hitting Shift+Reload or Ctrl+Reload if necessary (the "You 
-are already logged in" message should I<not> appear -- if it does, click 
-the C<logout> button and try again). Note the C<***Root::auto User not 
-found...> debug message in the development server output. Enter username 
-C<test01> and password C<mypass>, and you should be taken to the Book 
-List page. 
+The development server should have reloaded each time we edited one of
+the Controllers in the previous section. Now trying going to
+L<http://localhost:3000/books/list> and you should be redirected to the
+login page, hitting Shift+Reload or Ctrl+Reload if necessary (the "You
+are already logged in" message should I<not> appear -- if it does, click
+the C<logout> button and try again). Note the C<***Root::auto User not
+found...> debug message in the development server output. Enter username
+C<test01> and password C<mypass>, and you should be taken to the Book
+List page.
 
 B<IMPORTANT NOTE:> If you are having issues with authentication on
 Internet Explorer, be sure to check the system clocks on both your
@@ -604,8 +604,8 @@ need to log in to use this application."
 
 =head1 USING PASSWORD HASHES
 
-In this section we increase the security of our system by converting 
-from cleartext passwords to SHA-1 password hashes that include a 
+In this section we increase the security of our system by converting
+from cleartext passwords to SHA-1 password hashes that include a
 random "salt" value to make them extremely difficult to crack with
 dictionary and "rainbow table" attacks.
 
@@ -622,9 +622,9 @@ easy with the Catalyst plugin Catalyst::Plugin:RequireSSL.
 
 =head2 Re-Run the DBIC::Schema Model Helper to Include DBIx::Class::EncodedColumn
 
-Next, we can re-run the model helper to have it include 
-L<DBIx::Class::EncodedColumn|DBIx::Class::EncodedColumn> in all of the 
-Result Classes it generates for us.  Simply use the same command we 
+Next, we can re-run the model helper to have it include
+L<DBIx::Class::EncodedColumn|DBIx::Class::EncodedColumn> in all of the
+Result Classes it generates for us.  Simply use the same command we
 saw in Chapters 3 and 4, but add C<,EncodedColumn> to the C<components>
 argument:
 
@@ -632,8 +632,8 @@ argument:
         create=static components=TimeStamp,EncodedColumn dbi:SQLite:myapp.db \
         on_connect_do="PRAGMA foreign_keys = ON"
 
-If you then open one of the Result Classes, you will see that it 
-includes EncodedColumn in the C<load_components> line.  Take a look at 
+If you then open one of the Result Classes, you will see that it
+includes EncodedColumn in the C<load_components> line.  Take a look at
 C<lib/MyApp/Schema/Result/User.pm> since that's the main class where we
 want to use hashed and salted passwords:
 
@@ -650,8 +650,6 @@ the closing "1;":
     # with hex encoding; Generate the 'check_password" method
     __PACKAGE__->add_columns(
         'password' => {
-            data_type           => "TEXT",
-            size                => undef,
             encode_column       => 1,
             encode_class        => 'Digest',
             encode_args         => {salt_length => 10},
@@ -659,22 +657,22 @@ the closing "1;":
         },
     );
 
-This redefines the automatically generated definition for the password 
-fields at the top of the Result Class file to now use EncodedColumn 
-logic (C<encoded_column> is set to 1).  C<encode_class> can be set to 
-either C<Digest> to use 
-L<DBIx::Class::EncodedColumn::Digest|DBIx::Class::EncodedColumn::Digest>, 
-or C<Crypt::Eksblowfish::Bcrypt> for 
+This redefines the automatically generated definition for the password
+fields at the top of the Result Class file to now use EncodedColumn
+logic (C<encoded_column> is set to 1).  C<encode_class> can be set to
+either C<Digest> to use
+L<DBIx::Class::EncodedColumn::Digest|DBIx::Class::EncodedColumn::Digest>,
+or C<Crypt::Eksblowfish::Bcrypt> for
 L<DBIx::Class::EncodedColumn::Crypt::Eksblowfish::Bcrypt|DBIx::Class::EncodedColumn::Crypt::Eksblowfish::Bcrypt>.
-C<encode_args> is then used to customize the type of Digest you 
+C<encode_args> is then used to customize the type of Digest you
 selected. Here we only specified the size of the salt to use, but
-we could have also modified the hashing algorithm ('SHA-256' is 
+we could have also modified the hashing algorithm ('SHA-256' is
 the default) and the format to use ('base64' is the default, but
-'hex' and 'binary' are other options).  To use these, you could 
+'hex' and 'binary' are other options).  To use these, you could
 change the C<encode_args> to something like:
 
-            encode_args         => {algorithm => 'SHA-1', 
-                                    format => 'hex', 
+            encode_args         => {algorithm => 'SHA-1',
+                                    format => 'hex',
                                     salt_length => 10},
 
 
@@ -685,63 +683,63 @@ into the C<password> column of our C<users> table.  Open the file
 C<set_hashed_passwords.pl> in your editor and enter the following text:
 
     #!/usr/bin/perl
-    
+
     use strict;
     use warnings;
-    
+
     use MyApp::Schema;
-    
+
     my $schema = MyApp::Schema->connect('dbi:SQLite:myapp.db');
-    
+
     my @users = $schema->resultset('User')->all;
-    
+
     foreach my $user (@users) {
         $user->password('mypass');
         $user->update;
     }
 
-EncodedColumn lets us simple call C<$user->check_password($password)> 
-to see if the user has supplied the correct password, or, as we show 
-above, call C<$user->update($new_password)> to update the hashed 
+EncodedColumn lets us simple call C<$user->check_password($password)>
+to see if the user has supplied the correct password, or, as we show
+above, call C<$user->update($new_password)> to update the hashed
 password stored for this user.
 
 Then run the following command:
 
     $ DBIC_TRACE=1 perl -Ilib set_hashed_passwords.pl
 
-We had to use the C<-Ilib> argument to tell perl to look under the 
+We had to use the C<-Ilib> argument to tell perl to look under the
 C<lib> directory for our C<MyApp::Schema> model.
 
 The DBIC_TRACE output should show that the update worked:
 
     $ DBIC_TRACE=1 perl -Ilib set_hashed_passwords.pl
-    SELECT me.id, me.username, me.password, me.email_address, 
-    me.first_name, me.last_name, me.active FROM user me: 
-    UPDATE user SET password = ? WHERE ( id = ? ): 
+    SELECT me.id, me.username, me.password, me.email_address,
+    me.first_name, me.last_name, me.active FROM users me:
+    UPDATE users SET password = ? WHERE ( id = ? ):
     'oXiyAcGOjowz7ISUhpIm1IrS8AxSZ9r4jNjpX9VnVeQmN6GRtRKTz', '1'
-    UPDATE user SET password = ? WHERE ( id = ? ): 
+    UPDATE users SET password = ? WHERE ( id = ? ):
     'PmyEPrkB8EGwvaF/DvJm7LIfxoZARjv8ygFIR7pc1gEA1OfwHGNzs', '2'
-    UPDATE user SET password = ? WHERE ( id = ? ): 
+    UPDATE users SET password = ? WHERE ( id = ? ):
     'h7CS1Fm9UCs4hjcbu2im0HumaHCJUq4Uriac+SQgdUMUfFSoOrz3c', '3'
 
 But we can further confirm our actions by dumping the users table:
 
-    $ sqlite3 myapp.db "select * from user"
+    $ sqlite3 myapp.db "select * from users"
     1|test01|38d3974fa9e9263099f7bc2574284b2f55473a9bM=fwpX2NR8|t01@na.com|Joe|Blow|1
     2|test02|6ed8586587e53e0d7509b1cfed5df08feadc68cbMJlnPyPt0I|t02@na.com|Jane|Doe|1
     3|test03|af929a151340c6aed4d54d7e2651795d1ad2e2f7UW8dHoGv9z|t03@na.com|No|Go|0
 
-As you can see, the passwords are much harder to steal from the 
-database (not only are the hashes stored, but every hash is different 
-even though the passwords are the same because of the added "salt" 
-value).  Also note that this demonstrates how to use a DBIx::Class 
-model outside of your web application -- a very useful feature in many 
+As you can see, the passwords are much harder to steal from the
+database (not only are the hashes stored, but every hash is different
+even though the passwords are the same because of the added "salt"
+value).  Also note that this demonstrates how to use a DBIx::Class
+model outside of your web application -- a very useful feature in many
 situations.
 
 
 =head2 Enable Hashed and Salted Passwords
 
-Edit C<lib/MyApp.pm> and update it to match the following text (the 
+Edit C<lib/MyApp.pm> and update it to match the following text (the
 only change is to the C<password_type> field):
 
     # Configure SimpleDB Authentication
@@ -753,30 +751,30 @@ only change is to the C<password_type> field):
             },
         };
 
-The use of C<self_check> will cause 
-Catalyst::Plugin::Authentication::Store::DBIC to call the 
+The use of C<self_check> will cause
+Catalyst::Plugin::Authentication::Store::DBIC to call the
 C<check_password> method we enabled on our C<password> columns.
 
 
 =head2 Try Out the Hashed Passwords
 
-The development server should restart as soon as your save the 
-C<lib/MyApp.pm> file in the previous section. You should now be able to 
-go to L<http://localhost:3000/books/list> and login as before. When 
-done, click the "logout" link on the login page (or point your browser 
-at L<http://localhost:3000/logout>). 
+The development server should restart as soon as your save the
+C<lib/MyApp.pm> file in the previous section. You should now be able to
+go to L<http://localhost:3000/books/list> and login as before. When
+done, click the "logout" link on the login page (or point your browser
+at L<http://localhost:3000/logout>).
 
 
 =head1 USING THE SESSION FOR FLASH
 
-As discussed in the previous chapter of the tutorial, C<flash> allows 
-you to set variables in a way that is very similar to C<stash>, but it 
-will remain set across multiple requests.  Once the value is read, it 
-is cleared (unless reset).  Although C<flash> has nothing to do with 
-authentication, it does leverage the same session plugins.  Now that 
-those plugins are enabled, let's go back and update the "delete and 
-redirect with query parameters" code seen at the end of the L<Basic 
-CRUD|Catalyst::Manual::Tutorial::04_BasicCRUD> chapter of the tutorial to 
+As discussed in the previous chapter of the tutorial, C<flash> allows
+you to set variables in a way that is very similar to C<stash>, but it
+will remain set across multiple requests.  Once the value is read, it
+is cleared (unless reset).  Although C<flash> has nothing to do with
+authentication, it does leverage the same session plugins.  Now that
+those plugins are enabled, let's go back and update the "delete and
+redirect with query parameters" code seen at the end of the L<Basic
+CRUD|Catalyst::Manual::Tutorial::04_BasicCRUD> chapter of the tutorial to
 take advantage of C<flash>.
 
 First, open C<lib/MyApp/Controller/Books.pm> and modify C<sub delete>
@@ -784,21 +782,21 @@ to match the following (everything after the model search line of code
 has changed):
 
     =head2 delete
-    
+
     Delete a book
-    
+
     =cut
-    
+
     sub delete :Chained('object') :PathPart('delete') :Args(0) {
         my ($self, $c) = @_;
-    
+
         # Use the book object saved by 'object' and delete it along
         # with related 'book_authors' entries
         $c->stash->{object}->delete;
-    
+
         # Use 'flash' to save information across requests until it's read
         $c->flash->{status_msg} = "Book deleted";
-    
+
         # Redirect the user back to the list page
         $c->response->redirect($c->uri_for($self->action_for('list')));
     }
@@ -817,8 +815,8 @@ flash vs. the C<status_msg> query parameter:
     ...
 
 Although the sample above only shows the C<content> div, leave the
-rest of the file intact -- the only change we made to replace 
-"|| c.request.params.status_msg" with "c.flash.status_msg" in the 
+rest of the file intact -- the only change we made to replace
+"|| c.request.params.status_msg" with "c.flash.status_msg" in the
 C<< <span class="message"> >> line.
 
 
@@ -872,10 +870,10 @@ to match the following:
 
     <span class="message">[% status_msg %]</span>
 
-Now go to L<http://localhost:3000/books/list> in your browser. Delete 
-another of the "Test" books you added in the previous step. Flash should 
-still maintain the status message across the redirect even though you 
-are no longer explicitly accessing C<c.flash>. 
+Now go to L<http://localhost:3000/books/list> in your browser. Delete
+another of the "Test" books you added in the previous step. Flash should
+still maintain the status message across the redirect even though you
+are no longer explicitly accessing C<c.flash>.
 
 
 =head1 AUTHOR
@@ -886,5 +884,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -269,6 +269,11 @@ the "C<DO NOT MODIFY ...>" line:
         return any(map { $_->role } $self->roles) eq $role;
     }
 
+Let's also add Perl6::Junction to the requirements listed in 
+Makefile.PL:
+
+    requires 'Perl6::Junction';
+
 Now we need to add some enforcement inside our controller.  Open
 C<lib/MyApp/Controller/Books.pm> and update the C<delete> method to
 match the following code:
@@ -343,6 +348,6 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
 
@@ -348,7 +348,7 @@ Otherwise, it returns undef and nothing will be printed.
 If you run into issues during the rendering of your template, it might 
 be helpful to enable TT C<DEBUG> options.  You can do this in a Catalyst 
 environment by adding a C<DEBUG> line to the C<__PACKAGE__->config> 
-declaration in C<lib/MyApp/View/TT.pm>:
+declaration in C<lib/MyApp/View/HTML.pm>:
 
     __PACKAGE__->config({
         TEMPLATE_EXTENSION => '.tt2',
@@ -376,5 +376,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -349,7 +349,11 @@ maintain both a "production database" for your live application and a
 "testing database" for your test cases.  One advantage to
 L<Test::WWW::Mechanize::Catalyst|Test::WWW::Mechanize::Catalyst> is that
 it runs your full application; however, this can complicate things when
-you want to support multiple databases.  One solution is to allow the
+you want to support multiple databases.
+
+=head2 DATABASE CONFIG SWITCHING IN YOUR MODEL CLASS
+
+One solution is to allow the
 database specification to be overridden with an environment variable.
 For example, open C<lib/MyApp/Model/DB.pm> in your editor and
 change the C<__PACKAGE__-E<gt>config(...> declaration to resemble:
@@ -376,6 +380,50 @@ launch your normal application without the C<MYAPP_DSN> environment
 variable defined, it will default to the same C<dbi:SQLite:myapp.db> as
 before.
 
+=head2 DATABASE CONFIG SWITCHING USING MULTIPLE CONFIG FILES
+
+By utilizing L<Catalyst::Plugin::ConfigLoader>s functionality for loading
+multiple config files based on environment variables you can override your
+default (production) database connection settings.
+
+Setting C<$ENV{ MYAPP_CONFIG_LOCAL_SUFFIX }> to 'testing' in your test script
+results in loading of an additional config file named myapp_testing.conf after
+myapp.conf which will override any parameters in myapp.conf.
+
+You should set the environment variable in the BEGIN block of your test script
+to make sure it's set before your Catalyst application is started.
+
+The following is an example for a config and test script for a DBIx::Class
+model named MyDB and a controller named Foo:
+
+myapp_testing.conf:
+
+    <Model::MyDB>
+        <connect_info>
+            dsn dbi:SQLite:myapp.db
+        </connect_info>
+    </Model::MyDB>
+
+
+t/controller_Foo.t:
+
+    use strict;
+    use warnings;
+    use Test::More;
+
+    BEGIN {
+        $ENV{ MYAPP_CONFIG_LOCAL_SUFFIX } = 'testing';
+    }
+
+    eval "use Test::WWW::Mechanize::Catalyst 'MyApp'";
+    plan $@
+        ? ( skip_all => 'Test::WWW::Mechanize::Catalyst required' )
+        : ( tests => 2 );
+
+    ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' );
+
+    $mech->get_ok( 'http://localhost/foo' );
+
 
 =head1 AUTHOR
 
@@ -385,6 +433,6 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
 
@@ -642,5 +642,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
-(L<http://creativecommons.org/licenses/by-sa/3.0/us/>).    
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
+(L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -56,10 +56,11 @@ L<Appendices|Catalyst::Manual::Tutorial::10_Appendices>
 
 =head1 DESCRIPTION
 
-This portion of the tutorial explores L<HTML::FormHandler|HTML::FormHandler> and 
-how it can be used to manage forms, perform validation of form input, 
-as well as save and restore data to/from the database.  This was written
-using HTML::FormHandler version 0.28001.
+This portion of the tutorial explores
+L<HTML::FormHandler|HTML::FormHandler> and how it can be used to manage
+forms, perform validation of form input, and save and restore data
+to or from the database. This was written using HTML::FormHandler version
+0.28001.
 
 See 
 L<Catalyst::Manual::Tutorial::09_AdvancedCRUD|Catalyst::Manual::Tutorial::09_AdvancedCRUD>
@@ -75,9 +76,9 @@ from CPAN:
 
     sudo cpan HTML::FormHandler::Model::DBIC 
 
-It will install L<HTML::FormHandler> as a prereq. 
+It will install L<HTML::FormHandler> as a prerequisite. 
 
-Also add:
+Also, add:
 
     requires 'HTML::FormHandler::Model::DBIC';
 
@@ -91,7 +92,7 @@ add additional functionality to the manually created form from Chapter 4.
 
 =head2 Using FormHandler in your controllers 
 
-FormHandler doen't have a Catalyst base controller, because interfacing
+FormHandler dosen't have a Catalyst base controller, because interfacing
 to a form is only a couple of lines of code.
 
 =head2 Create a Book Form
@@ -221,15 +222,15 @@ Add range constraints to the 'rating' field:
    has_field 'rating' => ( type => 'Integer', range_start => 1, range_end => 5 );
 
 The 'authors' relationship is a 'many-to-many' pseudo-relation, so this field
-can be set to Multiple to allow the selection of multiple authors and make it
+can be set to Multiple to allow the selection of multiple authors; also, make it
 required:
 
    has_field 'authors' => ( type => 'Multiple', label_column => 'last_name',
                             required => 1 );
 
-Note: FormHandler automatically strips whitespace at the beginning or end of fields.
-If you want some other kind of stripping (or none) you can specify it explicitly.
-(see L<HTML::FormHandler::Manual>)
+Note: FormHandler automatically strips whitespace at the beginning and
+end of fields. If you want some other kind of stripping (or none) you
+can specify it explicitly; see L<HTML::FormHandler::Manual>.
 
 =head2 Try Out the Updated Form
 
@@ -99,5 +99,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -782,5 +782,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -708,17 +708,17 @@ PostgreSQL content in the Appendix.
 =item *
 
 People who have emailed me with corrections and suggestions on the 
-tutorial.  As of the most recent release, this include: Florian 
-Ragwitz, Mauro Andreolini, Jim Howard, Giovanni Gigante, William 
-Moreno,  Bryan Roach, Ashley Berlin, David Kamholz, Kevin Old, Henning 
-Sprang, Jeremy Jones, David Kurtz, Ingo Wichmann, Shlomi Fish, Murray 
-Walker, Adam Witney and xenoterracide.  Thanks to Devin Austin for 
-coming up with an initial version of a non-TTSite wrapper page.  
-Also, a huge thank you to Kiffin Gish for all the hard work on the 
-"database depluralization" effort and Rafael Kitover for the work on 
-updating the tutorial to include foreign key support for SQLite.  
-I'm sure I am missing some names here... apologies for that (please 
-let me know if you name should be here).
+tutorial. As of the most recent release, this include: Florian Ragwitz, 
+Mauro Andreolini, Jim Howard, Giovanni Gigante, William Moreno, Bryan 
+Roach, Ashley Berlin, David Kamholz, Kevin Old, Henning Sprang, Jeremy 
+Jones, David Kurtz, Ingo Wichmann, Shlomi Fish, Murray Walker, Adam 
+Witney and xenoterracide (Caleb Cushing). Thanks to Devin Austin for 
+coming up with an initial version of a non-TTSite wrapper page. Also, a 
+huge thank you to Kiffin Gish for all the hard work on the "database 
+depluralization" effort and Rafael Kitover for the work on updating the 
+tutorial to include foreign key support for SQLite. I'm sure I am 
+missing some names here... apologies for that (please let me know if you 
+name should be here). 
 
 =back
 
@@ -730,5 +730,5 @@ Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
 L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.
 
-Copyright 2006-2008, Kennedy Clark, under Creative Commons License
-(L<http://creativecommons.org/licenses/by-nc-sa/2.5/>).
+Copyright 2006-2010, Kennedy Clark, under Creative Commons License
+(L<http://creativecommons.org/licenses/by-sa/3.0/us/>).
@@ -6,7 +6,7 @@ package Catalyst::Manual;
 use strict;
 use warnings;
 
-our $VERSION = '5.8004';
+our $VERSION = '5.8005';
 
 =head1 NAME
 
@@ -24,7 +24,7 @@ Catalyst::Manual - The Catalyst developer's manual
 Install L<Task::Catalyst::Tutorial|Task::Catalyst::Tutorial> to
 install all the dependencies you need to follow along with the
 Tutorial.  You can also refer to 
-L<Catalyst::Manual::Tutorial::Intro|Catalyst::Manual::Tutorial::Intro>
+L<Catalyst::Manual::Tutorial::Intro|Catalyst::Manual::Tutorial::01_Intro>
 for more information on installation options.
 
 Some "Getting Started" Links: