[Catalyst-commits] r13617 - in Catalyst-Runtime/5.80/trunk: . lib
t/lib/TestApp/Controller
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Sep 29 00:27:11 GMT 2010
Author: t0m
Date: 2010-09-29 01:27:11 +0100 (Wed, 29 Sep 2010)
New Revision: 13617
Modified:
Catalyst-Runtime/5.80/trunk/Changes
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Anon.pm
Log:
Need to use _add_meta_method from new Moose onwards to avoid warnings
Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes 2010-09-29 00:04:09 UTC (rev 13616)
+++ Catalyst-Runtime/5.80/trunk/Changes 2010-09-29 00:27:11 UTC (rev 13617)
@@ -1,5 +1,8 @@
# This file documents the revision history for Perl extension Catalyst.
+ - Deal with Moose >= 1.15 warning if you add a method called 'meta' to a
+ class which already has one by using _add_meta_method.
+
5.80028 2010-09-28 20:49:00
Bug fixes:
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2010-09-29 00:04:09 UTC (rev 13616)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2010-09-29 00:27:11 UTC (rev 13617)
@@ -100,7 +100,12 @@
$meta->superclasses(grep { $_ ne 'Moose::Object' } $meta->superclasses);
unless( $meta->has_method('meta') ){
- $meta->add_method(meta => sub { Moose::Meta::Class->initialize("${caller}") } );
+ if ($Moose::VERSION >= 1.15) {
+ $meta->_add_meta_method('meta');
+ }
+ else {
+ $meta->add_method(meta => sub { Moose::Meta::Class->initialize("${caller}") } );
+ }
}
$caller->arguments( [@arguments] );
Modified: Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Anon.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Anon.pm 2010-09-29 00:04:09 UTC (rev 13616)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Anon.pm 2010-09-29 00:27:11 UTC (rev 13617)
@@ -25,7 +25,6 @@
# Special move as the methodattributes trait has changed our metaclass..
$meta = find_meta($meta->name);
- $meta->add_method('meta' => sub { $meta });
$class = $meta->name;
$class->new($app, $args);
}
More information about the Catalyst-commits
mailing list