[Catalyst-commits] r7736 - in Catalyst-Runtime/5.70/trunk: .
lib/Catalyst/DispatchType t
marcus at dev.catalyst.perl.org
marcus at dev.catalyst.perl.org
Sun May 11 10:08:43 BST 2008
Author: marcus
Date: 2008-05-11 10:08:43 +0100 (Sun, 11 May 2008)
New Revision: 7736
Added:
Catalyst-Runtime/5.70/trunk/t/dead_load_multiple_chained_attributes.t
Modified:
Catalyst-Runtime/5.70/trunk/Changes
Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Chained.pm
Log:
test for multiple chained attrs
Modified: Catalyst-Runtime/5.70/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.70/trunk/Changes 2008-05-11 04:33:25 UTC (rev 7735)
+++ Catalyst-Runtime/5.70/trunk/Changes 2008-05-11 09:08:43 UTC (rev 7736)
@@ -10,7 +10,8 @@
- Fix grammar on welcome page (RT #33236)
- Fix for Path('0') handling (RT #29334)
- Workaround for Win32 and c3_mro.t (RT #26452, tested by Kenichi Ishigaki)
- - Fix for encoding query parameters (eden)
+ - Fix for encoding query parameters (edenc)
+ - Fix Chained multiple test (t0m)
5.7012 2007-12-16 23:44:00
- Fix uri_for()'s and uri_with()'s handling of multibyte chars
Modified: Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Chained.pm
===================================================================
--- Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Chained.pm 2008-05-11 04:33:25 UTC (rev 7735)
+++ Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Chained.pm 2008-05-11 09:08:43 UTC (rev 7736)
@@ -208,7 +208,7 @@
return 0 unless @chained_attr;
- if (@chained_attr > 2) {
+ if (@chained_attr > 1) {
Catalyst::Exception->throw(
"Multiple Chained attributes not supported registering ${action}"
);
Added: Catalyst-Runtime/5.70/trunk/t/dead_load_multiple_chained_attributes.t
===================================================================
--- Catalyst-Runtime/5.70/trunk/t/dead_load_multiple_chained_attributes.t (rev 0)
+++ Catalyst-Runtime/5.70/trunk/t/dead_load_multiple_chained_attributes.t 2008-05-11 09:08:43 UTC (rev 7736)
@@ -0,0 +1,31 @@
+#!perl
+
+use strict;
+use warnings;
+use lib 't/lib';
+
+use Test::More;
+
+plan tests => 4;
+
+use Catalyst::Test 'TestApp';
+
+eval q{
+ package TestApp::Controller::Action::Chained;
+ sub should_fail : Chained('/') Chained('foo') Args(0) {}
+};
+ok(!$@);
+
+eval { TestApp->setup_actions; };
+ok($@, 'Multiple chained attributes make action setup fail');
+
+eval q{
+ package TestApp::Controller::Action::Chained;
+ no warnings 'redefine';
+ sub should_fail {}
+};
+ok(!$@);
+
+eval { TestApp->setup_actions };
+ok(!$@, 'And ok again') or warn $@;
+
More information about the Catalyst-commits
mailing list