in reply to How do I make a destructor?
This would be more useful if CowboyNeals were circular lists that needed to be broken, as in this case:package CowboyNeal; sub DESTROY { my $self = shift; print ref($self), " is going away. It was known as ", $self->name +(), " back in the day.\n"; }
But that's just downright nutty.sub DESTROY { my $self = shift; $self->{first} = undef; $self->{last} = undef; }
|
|---|