I've tried to dig around and to figure it out myself, but it isn't
clear for me yet (whether this is a bug or a design decision):
when we create an anonymous class and later create an object of this
class, shouldn't new_object method call BUILDALL?
It turns out that such an object isa 'Moose::Object', but
Moose::Object::new isn't involved in its creation.
package Aaa;
use Moose 0.98;
sub BUILD {
print "BUILD\n";
}
package main;
Aaa->new();
use Moose::Meta::Class;
my $Bbb = Moose::Meta::Class->create_anon_class(
superclasses => ['Aaa'],
);
my $Object = $Bbb->new_object();
# Is this my job or should Moose::Meta::Class::new_object do it?
$Object->BUILDALL( $Object->BUILDARGS() );
Thanks for your time!