Moo->_constructor_maker_for($target)
->register_attribute_specs(%{$old->all_attribute_specs});
}
+ elsif (!$target->isa('Moo::Object')) {
+ Moo->_constructor_maker_for($target);
+ }
no warnings 'once'; # piss off. -- mst
$Moo::HandleMoose::MOUSE{$target} = [
grep defined, map Mouse::Util::find_meta($_), @_
my ($class, %args) = @_;
return $args{attr};
}
+
+ package t::ext_non_moo_strict::without_attr;
+ use Moo;
+ extends qw( t::non_moo_strict );
+
+ sub FOREIGNBUILDARGS {
+ my ($class, %args) = @_;
+ return $args{attr2};
+ }
}
my $non_moo = t::non_moo_strict->new( 'bar' );
my $ext_non_moo = t::ext_non_moo_strict::with_attr->new( attr => 'bar', attr2 => 'baz' );
+my $ext_non_moo2 = t::ext_non_moo_strict::without_attr->new( attr => 'bar', attr2 => 'baz' );
is $non_moo->attr, 'bar',
"non-moo accepts params";
"extended non-moo passes params";
is $ext_non_moo->attr2, 'baz',
"extended non-moo has own attributes";
+is $ext_non_moo2->attr, 'baz',
+ "extended non-moo passes params";
done_testing;