package Foo::Bar; my @lineage = ('Mom', 'Dad'); @ISA = (@lineage); sub selfcheck { die "You can\'t change who I am." unless __PACKAGE__ eq 'Foo::Bar'; map { die "You can\'t change who my parents are." unless $lineage[$_] eq $ISA[$_] } (0..(scalar @ISA - 1)); } sub DESTROY { $self->Foo::Bar::selfcheck; } sub method_name { my $self=shift; $self->Foo::Bar::selfcheck; # method stuff here } sub method_name2 { $self->Foo::Bar::selfcheck; # method stuff here }