Skip Menu |

This queue is for tickets about the MooseX-StrictConstructor CPAN distribution.

Report information
The Basics
Id: 120124
Status: resolved
Priority: 0/
Queue: MooseX-StrictConstructor

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
On 2017-02-06 12:32:43, ETHER wrote: Show quoted text
> 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.
patched in https://github.com/moose/MooseX-StrictConstructor/pull/1