4 use Test::More tests => 5;
13 push @called, 'Class::BUILD';
18 # push @called, 'Class::BUILDALL';
19 # $self->SUPER::BUILDALL(@_);
27 push @called, 'Child::BUILD';
32 # push @called, 'Child::BUILDALL';
33 # $self->SUPER::BUILDALL(@_);
37 is_deeply([splice @called], [], "no BUILD calls yet");
39 my $object = Class->new;
41 is_deeply([splice @called], ["Class::BUILD"]);
43 my $child = Child->new;
45 is_deeply([splice @called], ["Class::BUILD", "Child::BUILD"]);
47 Class->meta->make_immutable;
48 Child->meta->make_immutable;
52 is_deeply([splice @called], ["Class::BUILD"], 'after make_immutable');
56 is_deeply([splice @called], ["Class::BUILD", "Child::BUILD"], 'after make_immutable');