Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 113743
Status: resolved
Priority: 0/
Queue: Moo

People
Owner: Nobody in particular
Requestors: ribasushi [...] leporine.io
Cc:
AdminCc:

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



Subject: Fireworks on overridden CORE::GLOBAL::bless combined with $INC{"Moose.pm"}
For unrelated reasons I need to hook CORE::GLOBAL::bless in my test suite in order to validate a particular condition during CI. The failure can be reduced to the below, note how both the lack of Moose and the lack of the ->isa check make the problem disappear: ~$ perl -e ' BEGIN { *CORE::GLOBAL::bless = sub { my $obj = CORE::bless( $_[0], (@_ > 1) ? $_[1] : CORE::caller() ); # without this - no issues if( $obj->isa("Foo") ) { my $do = "some stuff in the future" } $obj; }; } # without this - no issues either BEGIN { require Moose } use Moo; ' and results in: Can't locate object method "install_delayed" via package "Method::Generate::Constructor" at /home/rabbit/perl5/perlbrew/perls/5.22.1/lib/site_perl/5.22.1/Moo.pm line 218. BEGIN failed--compilation aborted at /home/rabbit/perl5/perlbrew/perls/5.22.1/lib/site_perl/5.22.1/Method/Generate/Constructor.pm line 8. Compilation failed in require at /home/rabbit/perl5/perlbrew/perls/5.22.1/lib/site_perl/5.22.1/Moo.pm line 161. BEGIN failed--compilation aborted at -e line 16.
Fixed in acb233d and 02048ac.
Fixed in 2.002002.