13 push @called, 'Class::DEMOLISH';
18 push @called, 'Class::DEMOLISHALL';
19 $self->SUPER::DEMOLISHALL(@_);
27 push @called, 'Child::DEMOLISH';
32 push @called, 'Child::DEMOLISHALL';
33 $self->SUPER::DEMOLISHALL(@_);
37 is_deeply([splice @called], [], "no DEMOLISH calls yet");
40 my $object = Class->new;
42 is_deeply([splice @called], [], "no DEMOLISH calls yet");
45 is_deeply([splice @called], ['Class::DEMOLISHALL', 'Class::DEMOLISH']);
48 my $child = Child->new;
49 is_deeply([splice @called], [], "no DEMOLISH calls yet");
53 is_deeply([splice @called], ['Child::DEMOLISHALL', 'Class::DEMOLISHALL', 'Child::DEMOLISH', 'Class::DEMOLISH']);