it failed by segmentation fault when run this script by Mouse >= 2.3.0
use strict;
use warnings;
{
package Simple;
sub foo { 1 }
}
{
package MyAdditionalRole;
use Mouse::Role;
sub added { 1 }
no Mouse::Role;
}
{
package MyClass;
use Mouse;
use MouseX::Foreign 'Simple';
}
sub test {
my $obj = MyClass->new();
MyAdditionalRole->meta->apply($obj);
return;
}
test();
it failed by segmentation fault when run this script by Mouse >= 2.3.0
and Segmentation fault occurs in the this places. https://github.com/gfx/p5-Mouse/blob/318408ab5c5375c5d1a18f018c9cf59ecb548176/lib/Mouse/Meta/Module.pm#L289-L290 Maybe due to this change. https://github.com/gfx/p5-Mouse/compare/2.2.0...2.3.0#diff-e26c8c9cce35421fe9115643de112245R61