Subject: | does not handle __no_BUILD__ |
When a Moo class subclasses a Moose class that uses MooseX::StrictConstructor, MXSC blows up on the unexpected __no_BUILD__ argument passed to the constructor.
# lib/Parent.pm
package Parent;
use Moose;
use MooseX::StrictConstructor;
1;
# lib/Child.pm
package Parent;
package Child;
use Moo;
extends 'Parent';
1;
: [ether@jaeger git/Moose]$; perl -Mblib -MChild -wle'print Child->new()'
Found unknown attribute(s) init_arg passed to the constructor: __no_BUILD__ at /Volumes/amaretto/Users/ether/git/Moose/blib/lib/Class/MOP/Object.pm line 14
Class::MOP::Object::throw_error('Moose::Meta::Class::__ANON__::SERIAL::1=HASH(0x7f84bca8d668)', 'Found unknown attribute(s) init_arg passed to the constructor: __no_BUILD__') called at /Volumes/amaretto/Users/ether/.perlbrew/libs/25.9@std/lib/perl5/MooseX/StrictConstructor/Trait/Class.pm line 29
Class::MOP::Class:::around('CODE(0x7f84bbdcb5a8)', 'Moose::Meta::Class::__ANON__::SERIAL::1=HASH(0x7f84bca8d668)', 'HASH(0x7f84bca93300)') called at /Volumes/amaretto/Users/ether/git/Moose/blib/lib/Class/MOP/Method/Wrapped.pm line 164
Moose::Meta::Class::__ANON__::SERIAL::1::_wrapped_new_object('Moose::Meta::Class::__ANON__::SERIAL::1=HASH(0x7f84bca8d668)', 'HASH(0x7f84bca93300)') called at /Volumes/amaretto/Users/ether/git/Moose/blib/lib/Class/MOP/Method/Wrapped.pm line 95
Moose::Meta::Class::__ANON__::SERIAL::1::new_object('Moose::Meta::Class::__ANON__::SERIAL::1=HASH(0x7f84bca8d668)', 'HASH(0x7f84bca93300)') called at /Volumes/amaretto/Users/ether/.perlbrew/libs/25.9@std/lib/perl5/Moo/HandleMoose/FakeMetaClass.pm line 16
Moo::HandleMoose::FakeMetaClass::AUTOLOAD('Moo::HandleMoose::FakeMetaClass=HASH(0x7f84bb9cad40)', 'HASH(0x7f84bca93300)') called at /Volumes/amaretto/Users/ether/git/Moose/blib/lib/Moose/Object.pm line 24
Moose::Object::new('Child', 'HASH(0x7f84bca932b8)') called at (eval 184) line 36
Child::new('Child') called at -e line 1