Fix C::Request disparity between _body and body accessors, TODO test now passes.
Tomas Doran [Sat, 27 Dec 2008 18:08:02 +0000 (18:08 +0000)]
Changes
lib/Catalyst/Request.pm
t/aggregate/live_engine_request_body.t

diff --git a/Changes b/Changes
index d150d79..5cfa657 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,8 +1,8 @@
 # This file documents the revision history for Perl extension Catalyst.
 
-        - Add TODO tests for calling $c->req->body from inside an overridden
-          prepare_action method in a plugin, as used by 
-          Catalyst::Plugin::Server (t0m)
+        - Fix calling $c->req->body from inside an overridden prepare_action
+          method in a plugin, as used by Catalyst::Plugin::Server (t0m)
+          - Test for this (t0m)
         - Fix assignment to Catalyst::Dispatcher's preload_dispatch_types and
           postload_dispatch_types attributes - assigning a list should later 
           return a listref. Fixes Catalyst::Plugin::Server. (t0m)
index a5f144c..85c4941 100644 (file)
@@ -96,8 +96,9 @@ has base => (
   },
 );
 
-has body => (
-  is => 'rw'
+has _body => (
+  is => 'rw',
+  accessor => 'body',
 );
 
 before body => sub {
index 1897af3..40d7ab2 100644 (file)
@@ -86,9 +86,6 @@ use HTTP::Request::Common;
 
     ok( my $response = request($request), 'Request' );
     ok( $response->is_success, 'Response Successful 2xx' );
-    TODO: {
-        local $TODO = 'On demand request body parsing in prepare_action broken';
-        like( $response->content, qr/^[1-9]/, 'Has body' );
-    }
+    like( $response->content, qr/^[1-9]/, 'Has body' );
 }