+ - make extends after has work
- name subs if Sub::Name is available for better stracktraces
- undefer all subs before creating a concrete Moose metaclass
- fix bug in _load_module where global vars could cause mis-detection
_load_module($_) for @_;
# Can't do *{...} = \@_ or 5.10.0's mro.pm stops seeing @ISA
@{*{_getglob("${target}::ISA")}{ARRAY}} = @_;
+ if (my $old = delete $Moo::MAKERS{$target}{constructor}) {
+ delete _getstash($target)->{new};
+ Moo->_constructor_maker_for($target)
+ ->register_attribute_specs(%{$old->all_attribute_specs});
+ }
};
_install_coderef "${target}::with" => sub {
require Moo::Role;
--- /dev/null
+use strictures 1;
+use Test::More;
+
+{
+ package Fail1;
+
+ use Moo;
+
+ has 'attr1' => (is => 'ro');
+
+ package Fail2;
+
+ use Moo;
+
+ has 'attr2' => (is => 'ro');
+
+ extends 'Fail1';
+}
+
+my $new = Fail2->new({ attr1 => 'value1', attr2 => 'value2' });
+
+is($new->attr1, 'value1', 'inherited attr ok');
+is($new->attr2, 'value2', 'subclass attr ok');
+
+done_testing;