Fix for Catalyst::Action::REST
Tomas Doran [Wed, 3 Dec 2008 10:51:11 +0000 (10:51 +0000)]
Changes
lib/Catalyst/Request.pm
t/custom_request.t [new file with mode: 0644]

diff --git a/Changes b/Changes
index af282c3..a9ec1bb 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,9 @@
 # This file documents the revision history for Perl extension Catalyst.
 
 5.8000_04
+        - Add MooseX::Emulate::Class::Accessor::Fast to Catalyst::Request,
+          needed by Catalyst::Request::REST (t0m)
+          - Test for this (t0m)
         - Make hostname resolution lazy (Marc Mims)
         - Support mocking virtualhosts in test suite (Jason Gottshall)
         - Add README (marcus)
index 27f521f..c49d283 100644 (file)
@@ -10,6 +10,8 @@ use HTTP::Headers;
 
 use Moose;
 
+with 'MooseX::Emulate::Class::Accessor::Fast';
+
 has action => (is => 'rw');
 has address => (is => 'rw');
 has arguments => (is => 'rw', default => sub { [] });
diff --git a/t/custom_request.t b/t/custom_request.t
new file mode 100644 (file)
index 0000000..e7a80ce
--- /dev/null
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+use Test::Exception;
+
+lives_ok {
+    package TestApp::TestCustomRequest;
+    use strict;
+    use warnings;
+    use base qw/Catalyst::Request/;
+
+    # Catalyst::Request::REST uses this, so test it in core..
+    __PACKAGE__->mk_accessors(qw( custom_accessor ));
+} 'Can make a custom request class';
+
+