Subject: | BUILD is not executed with Moose 2 |
If I make class immutable its BUILD method is not executed with Moose
2.0000. Attached test passes with Moose 1.25, but fails with Moose 2.0000.
--
Pavel Shaydo
Subject: | build_immutable.t |
use Test::More qw(no_plan);
{
package Singleton;
use MooseX::Singleton;
has attribute => (is => 'rw');
sub BUILD
{
shift->attribute(1);
}
no Moose;
__PACKAGE__->meta->make_immutable;
}
my $s = Singleton->instance;
ok $s->attribute, "Attribute is set";