4 use Test::More tests => 9;
14 push @called, 'Class::BUILD';
19 # push @called, 'Class::BUILDALL';
20 # $self->SUPER::BUILDALL(@_);
28 push @called, 'Child::BUILD';
33 # push @called, 'Child::BUILDALL';
34 # $self->SUPER::BUILDALL(@_);
38 is_deeply([splice @called], [], "no BUILD calls yet");
41 my $object = Class->new;
43 ok defined($object), $object->meta->is_immutable() ? 'mutable' : 'immutable';
45 is_deeply([splice @called], ["Class::BUILD"]);
47 my $child = Child->new;
49 is_deeply([splice @called], ["Class::BUILD", "Child::BUILD"]);
53 is_deeply([splice @called], ["Class::BUILD", "Child::BUILD"], 'BUILDALL');