summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-09-27 12:18:31 -0500
committerJesse Luehrs <doy@tozt.net>2009-09-27 12:18:31 -0500
commitf6aa3947ab97bcd3fa6e4ecf14242ef7b7d78785 (patch)
tree6603a49a678732325add4f47b940ad1498c4cd8a /lib
parent0b32c8abced2ccc028eb8cb3589d3a9cb775a113 (diff)
downloadmoosex-nonmoose-f6aa3947ab97bcd3fa6e4ecf14242ef7b7d78785.tar.gz
moosex-nonmoose-f6aa3947ab97bcd3fa6e4ecf14242ef7b7d78785.zip
use a less broken test for a superclass inlined constructor
Diffstat (limited to 'lib')
-rw-r--r--lib/MooseX/NonMoose/Meta/Role/Class.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/MooseX/NonMoose/Meta/Role/Class.pm b/lib/MooseX/NonMoose/Meta/Role/Class.pm
index a17892c..6afce2f 100644
--- a/lib/MooseX/NonMoose/Meta/Role/Class.pm
+++ b/lib/MooseX/NonMoose/Meta/Role/Class.pm
@@ -1,5 +1,6 @@
package MooseX::NonMoose::Meta::Role::Class;
use Moose::Role;
+use List::MoreUtils qw(any);
=head1 NAME
@@ -114,8 +115,8 @@ around superclasses => sub {
# if the constructor we're inheriting is an inlined version of the
# default moose constructor, don't do anything either
- # XXX: wrong if the class overrode new manually?
- return @ret if $constructor_class_meta->name eq 'Moose::Meta::Method::Constructor';
+ return @ret if any { $_->isa($constructor_class_meta->name) }
+ $super_new->associated_metaclass->_inlined_methods;
}
$self->add_method(new => sub {