[Catalyst-commits] r8934 - in Catalyst-Runtime/5.80/trunk: . t/lib

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Sun Dec 21 20:30:55 GMT 2008


Author: t0m
Date: 2008-12-21 20:30:55 +0000 (Sun, 21 Dec 2008)
New Revision: 8934

Added:
   Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithNewMethod.pm
Modified:
   Catalyst-Runtime/5.80/trunk/TODO
Log:
Actually add the plugin, and remove the TODO item

Modified: Catalyst-Runtime/5.80/trunk/TODO
===================================================================
--- Catalyst-Runtime/5.80/trunk/TODO	2008-12-21 19:48:59 UTC (rev 8933)
+++ Catalyst-Runtime/5.80/trunk/TODO	2008-12-21 20:30:55 UTC (rev 8934)
@@ -6,9 +6,6 @@
 
 Back-compat investigation / konwon issues:
 
-  - Find out why C::P::A's test suite causes the 'stack' attributes
-    default method to not be called. (new not being run??)
-
   - Common engine test failures, look into and get tests into core.
 
   - CatalystX-Imports, Class::MOP doesn't consider anon subs in the symbol 

Added: Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithNewMethod.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithNewMethod.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithNewMethod.pm	2008-12-21 20:30:55 UTC (rev 8934)
@@ -0,0 +1,29 @@
+{
+    package NewTestPlugin;
+    use strict;
+    use warnings;
+    sub new { 
+        my $class = shift;
+        return bless $_[0], $class; 
+    }
+}
+
+{
+    package TestAppPluginWithNewMethod;
+    use Test::Exception;
+    use Catalyst qw/+NewTestPlugin/;
+
+    sub foo : Local {
+        my ($self, $c) = @_;
+        $c->res->body('foo');
+    }
+
+    use Moose; # Just testing method modifiers still work.
+    __PACKAGE__->setup;
+    our $MODIFIER_FIRED = 0;
+
+    lives_ok {
+        before 'dispatch' => sub { $MODIFIER_FIRED = 1 }
+    } 'Can apply method modifier';
+    no Moose;
+}




More information about the Catalyst-commits mailing list