diff options
author | doy <doy@tozt.net> | 2009-04-11 17:12:24 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-04-11 17:12:24 -0500 |
commit | d0567cfe08a19d7a488f7a24a1d7d92c33663c14 (patch) | |
tree | 7a1bf7a5b10a8c775bd6d177a018e90f33aa9764 /lib | |
parent | eaf615a6387b9cf4202f9fd1d5f64225c4a06200 (diff) | |
download | moosex-nonmoose-d0567cfe08a19d7a488f7a24a1d7d92c33663c14.tar.gz moosex-nonmoose-d0567cfe08a19d7a488f7a24a1d7d92c33663c14.zip |
extends shouldn't do anything special to the constructor if it would otherwise just be calling a moose constructor
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MooseX/NonMoose.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/MooseX/NonMoose.pm b/lib/MooseX/NonMoose.pm index 0db4fb6..1d76f52 100644 --- a/lib/MooseX/NonMoose.pm +++ b/lib/MooseX/NonMoose.pm @@ -21,6 +21,9 @@ sub extends { # we're calling it on my $super_new = $caller_meta->find_next_method_by_name('new'); + # if we're trying to extend a moose class, just do nothing + return if $super_new->package_name eq 'Moose::Object'; + if ($super_new->associated_metaclass->can('constructor_class')) { my $constructor_class_meta = Class::MOP::Class->initialize( $super_new->associated_metaclass->constructor_class |