[Catalyst-commits] r8995 - in Catalyst-Runtime/5.80/trunk: .
lib/Catalyst t t/lib
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Sat Jan 3 12:42:17 GMT 2009
Author: t0m
Date: 2009-01-03 12:42:16 +0000 (Sat, 03 Jan 2009)
New Revision: 8995
Modified:
Catalyst-Runtime/5.80/trunk/TODO
Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm
Catalyst-Runtime/5.80/trunk/t/cdi_backcompat_plugin_accessor_override.t
Catalyst-Runtime/5.80/trunk/t/lib/CDICompatTestPlugin.pm
Log:
More CDI related fail
Modified: Catalyst-Runtime/5.80/trunk/TODO
===================================================================
--- Catalyst-Runtime/5.80/trunk/TODO 2009-01-03 02:32:03 UTC (rev 8994)
+++ Catalyst-Runtime/5.80/trunk/TODO 2009-01-03 12:42:16 UTC (rev 8995)
@@ -33,6 +33,14 @@
- CatalystX-CRUD fails tests against 5.80 (karpet)
+ - Catalyst-Plugin-Authorization-ACL fails as
+ Catalyst::Dispatcher::_do_forward does not fix arguments if you throw
+ an exception. Needs a test case (Caelum)
+
+ - Catalyst::Plugin::Authentication::Store::DBIC fails as
+ overriding the setup_finished class data method in a plugin no longer
+ works correctly (see t/cdi_backcompat_accessor_override.t).
+
- Issues with TWMC not being loaded when it used to be in 5.70
(Bill Moseley)
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm 2009-01-03 02:32:03 UTC (rev 8994)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm 2009-01-03 12:42:16 UTC (rev 8995)
@@ -33,6 +33,7 @@
# then copy it into our package. Is this the correct
# fix for C::D::I back-compat? (t0m)
my $parent_symbol = *{"${super}::${attribute}"}{CODE} ? \&{"${super}::${attribute}"} : undef;
+ # FIXME - this is over-enthusiastic?
if (defined $parent_symbol) {
*{"${pkg}::${attribute}"} = $parent_symbol;
}
Modified: Catalyst-Runtime/5.80/trunk/t/cdi_backcompat_plugin_accessor_override.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/cdi_backcompat_plugin_accessor_override.t 2009-01-03 02:32:03 UTC (rev 8994)
+++ Catalyst-Runtime/5.80/trunk/t/cdi_backcompat_plugin_accessor_override.t 2009-01-03 12:42:16 UTC (rev 8995)
@@ -2,7 +2,7 @@
use warnings;
use lib 't/lib';
-use Test::More tests => 1;
+use Test::More tests => 2;
use Test::Exception;
# Force a stack trace.
@@ -28,3 +28,11 @@
CDICompatTestApp->setup;
} 'Setup app with plugins which says use base qw/Class::Accessor::Fast/';
+# And the plugin's setup_finished method should have been run, as accessors
+# are not created in MyApp until the data is written to.
+TODO: {
+ local $TODO = "Copying the class data accessor down into MyApp other than at runtime\n" .
+ " when assigned (as pre exact CDI behavior) causes methods to not get run';
+ no warnings 'once';
+ is $CDICompatTestPlugin::Data::HAS_RUN_SETUP_FINISHED, 1, 'Plugin setup_finish run';
+}
Modified: Catalyst-Runtime/5.80/trunk/t/lib/CDICompatTestPlugin.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/CDICompatTestPlugin.pm 2009-01-03 02:32:03 UTC (rev 8994)
+++ Catalyst-Runtime/5.80/trunk/t/lib/CDICompatTestPlugin.pm 2009-01-03 12:42:16 UTC (rev 8995)
@@ -25,4 +25,18 @@
$app->next::method(@_);
}
+# However, if we are too enthusiastic about adding accessors to the
+# MyApp package, then this method isn't called (as there is a local
+# symbol already).
+
+# Note - use a different package here, so that Moose's
+# package detection code doesn't get confused..
+$CDICompatTestPlugin::Data::HAS_RUN_SETUP_FINISHED = 0;
+
+sub setup_finished {
+ my $app = shift;
+ $CDICompatTestPlugin::Data::AS_RUN_SETUP_FINISHED = 1;
+ $app->next::method(@_);
+}
+
1;
More information about the Catalyst-commits
mailing list