X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FCookbook.pod;h=bb565356d38a8a91e6741667ae139ff16f8c3ba1;hb=e541538422e839971d0c91c47ea19029de01cfa5;hp=1e0832b5589b2d4b8a435307bd25a14634eec9d1;hpb=76776098d4731f120ecb88210b29a4496063e097;p=catagits%2FCatalyst-Manual.git diff --git a/lib/Catalyst/Manual/Cookbook.pod b/lib/Catalyst/Manual/Cookbook.pod index 1e0832b..bb56535 100644 --- a/lib/Catalyst/Manual/Cookbook.pod +++ b/lib/Catalyst/Manual/Cookbook.pod @@ -33,9 +33,12 @@ to go into this C method; see L). 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$/; @@ -2355,7 +2358,7 @@ C environment variable is true. mundus:~/MyApp chansen$ cat t/01app.t | perl -ne 'printf( "%2d %s", $., $_ )' 1 use Test::More tests => 2; - 2 use_ok( Catalyst::Test, 'MyApp' ); + 2 BEGIN { use_ok( Catalyst::Test, 'MyApp' ) } 3 4 ok( request('/')->is_success ); @@ -2420,7 +2423,7 @@ Be sure to check out C. It makes it easy to test HTML, forms and links. A short example of usage: use Test::More tests => 6; - use_ok( Test::WWW::Mechanize::Catalyst, 'MyApp' ); + BEGIN { use_ok( Test::WWW::Mechanize::Catalyst, 'MyApp' ) } my $mech = Test::WWW::Mechanize::Catalyst->new; $mech->get_ok("http://localhost/", 'Got index page'); @@ -2435,7 +2438,7 @@ test HTML, forms and links. A short example of usage: =item Catalyst::Test -L +L =item Test::WWW::Mechanize::Catalyst