The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Catalyst-Runtime-5.90061/t/lib/TestContentNegotiation/share/file.txt 500
Catalyst-Runtime-5.90061/t/lib/TestMiddlewareFromConfig/share/static/forced.txt 10
Catalyst-Runtime-5.90061/t/lib/TestMiddlewareFromConfig/share/static2/message2.txt 10
Catalyst-Runtime-5.90061/t/lib/TestMiddlewareFromConfig/share/static3/message3.txt 10
Changes 04
META.yml 11
lib/Catalyst/Runtime.pm 11
lib/Catalyst.pm 55
t/http_exceptions.t 06
9 files changed (This is a version diff) 6017
@@ -1,50 +0,0 @@
-package TestContentNegotiation::Controller::Root;
-
-use Moose;
-use MooseX::MethodAttributes;
-
-extends 'Catalyst::Controller';
-
-sub start :Chained(/) PathPrefix CaptureArgs(0) { }
-
-    sub is_json       : Chained('start') PathPart('') Consumes('application/json') Args(0) { pop->res->body('is_json') }
-    sub is_urlencoded : Chained('start') PathPart('') Consumes('application/x-www-form-urlencoded') Args(0) { pop->res->body('is_urlencoded') }
-    sub is_multipart  : Chained('start') PathPart('') Consumes('multipart/form-data') Args(0) { pop->res->body('is_multipart') }
-      
-    sub under :Chained('start') CaptureArgs(0) { }
-
-      sub is_json_under       : Chained('under') PathPart('') Consumes(JSON) Args(0) { pop->res->body('is_json') }
-      sub is_urlencoded_under : Chained('under') PathPart('') Consumes(UrlEncoded) Args(0) { pop->res->body('is_urlencoded') }
-      sub is_multipart_under  : Chained('under') PathPart('') Consumes(Multipart) Args(0) { pop->res->body('is_multipart') }
-
-      ## Or allow more than one type
-    
-    sub multi :Chained('start') CaptureArgs(0) { }
-      
-    sub is_more_than_one_1
-      : Chained('multi') PathPart('')
-      : Consumes('application/x-www-form-urlencoded')
-      : Consumes('multipart/form-data')
-      : Args(0)
-    {
-      pop->res->body('formdata1');
-    }
-
-    sub is_more_than_one_2
-      : Chained('multi') PathPart('')
-      : Consumes('HTMLForm')
-      : Args(0)
-    {
-      pop->res->body('formdata2');
-    }
-
-    sub is_more_than_one_3
-      : Chained('multi') PathPart('')
-      : Consumes('application/x-www-form-urlencoded,multipart/form-data')
-      : Args(0)
-    {
-      pop->res->body('formdata3');
-    }
-
-
-__PACKAGE__->meta->make_immutable;
@@ -1,5 +1,9 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+5.90061 - 2014-04-14
+  - HTTP::Exception objects were not properly bubbled up to middleware since
+    there was some code in Catalyst that was triggering stringification.
+
 5.90061 - 2014-03-10
   - Reverted a change related to how plugins get initialized that was
     introduced by a change in December.
@@ -91,5 +91,5 @@ resources:
   homepage: http://dev.catalyst.perl.org/
   license: http://dev.perl.org/licenses/
   repository: git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git
-version: '5.90061'
+version: '5.90062'
 x_authority: cpan:MSTROUT
@@ -7,7 +7,7 @@ BEGIN { require 5.008003; }
 
 # Remember to update this in Catalyst as well!
 
-our $VERSION = '5.90061';
+our $VERSION = '5.90062';
 
 =head1 NAME
 
@@ -126,7 +126,7 @@ __PACKAGE__->stats_class('Catalyst::Stats');
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.90061';
+our $VERSION = '5.90062';
 
 sub import {
     my ( $class, @arguments ) = @_;
@@ -2015,12 +2015,12 @@ sub handle_request {
         $c->dispatch;
         $status = $c->finalize;
     } catch {
-        chomp(my $error = $_);
-        $class->log->error(qq/Caught exception in engine "$error"/);
         #rethow if this can be handled by middleware
-        if(blessed $error && ($error->can('as_psgi') || $error->can('code'))) {
-            $error->can('rethrow') ? $error->rethrow : croak $error;
+        if(blessed $_ && ($_->can('as_psgi') || $_->can('code'))) {
+            $_->can('rethrow') ? $_->rethrow : croak $_;
         }
+        chomp(my $error = $_);
+        $class->log->error(qq/Caught exception in engine "$error"/);
     };
 
     $COUNT++;
@@ -12,6 +12,10 @@ use Plack::Test;
 {
   package MyApp::Exception;
 
+  use overload
+    # Use the overloading thet HTTP::Exception uses
+    bool => sub { 1 }, '""' => 'as_string', fallback => 1;
+
   sub new {
     my ($class, $code, $headers, $body) = @_;
     return bless +{res => [$code, $headers, $body]}, $class;
@@ -30,6 +34,8 @@ use Plack::Test;
       $responder->([$code, $headers, $body]);
     };
   }
+
+  sub as_string { 'bad stringy bad' }
   
   package MyApp::Controller::Root;