package LL::Node; { my $allocated=0 sub new { $allocated++; bless {},$_[0]; } sub DESTROY { $allocated--; } sub END { warn "There were $allocated nodes that have not been properly freed dusing destruction.\n" if $allocated; } } # other stuff