From: Tomas Doran Date: Wed, 3 Dec 2008 15:00:23 +0000 (+0000) Subject: Fix FormFu in 5.80 + test, zamolxes++ X-Git-Tag: 5.8000_04~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=241edc9b196ed1d8366b0011c814b0c2d9357516;hp=b99ff5d87e80f13652bf374e2ce8f10c7156ac6e Fix FormFu in 5.80 + test, zamolxes++ --- diff --git a/Changes b/Changes index a9ec1bb..a28d9f8 100644 --- 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::Action, + needed by Catalyst::Controller::HTML::FormFu (zamolxes) + - Test for this (zamolxes) - Add MooseX::Emulate::Class::Accessor::Fast to Catalyst::Request, needed by Catalyst::Request::REST (t0m) - Test for this (t0m) diff --git a/TODO b/TODO index 407eb82..572c182 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,9 @@ - MooseX::Emulate::Class::Accessor::Fast - Tests for uses of C::A::F from Catalyst repos. - t0m - - Can't locate object method "mk_accessors" via package "Catalyst::Request::REST" - New release once these are done. - - Look into FormFu test fails, get tests in core (marcus?) + - Go through everything which used to use CAF, and ensure that it now uses MX::E::CAF + tests, + extending t/caf_backcompat.t and replacing t/custom_request.t (t0m) - Simple test for NEXT compat in core. diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index 83b4da3..f21e34d 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -19,6 +19,8 @@ L subclasses. use Moose; +with 'MooseX::Emulate::Class::Accessor::Fast'; + has class => (is => 'rw'); has namespace => (is => 'rw'); has 'reverse' => (is => 'rw'); diff --git a/t/caf_backcompat.t b/t/caf_backcompat.t new file mode 100644 index 0000000..975eda2 --- /dev/null +++ b/t/caf_backcompat.t @@ -0,0 +1,9 @@ +use strict; +use warnings; +use Test::More tests => 1; +use Test::Exception; +use Catalyst::Action; + +my $action=Catalyst::Action->new({foo=>'bar'}); + +is $action->{foo}, 'bar', 'custom Action attribute';