package MyArchive; use base 'Archive::Extract'; sub set_on_destroy { my ($self, $sub) = @_; $self->{'_on_destroy'} = $sub; } sub DESTROY { my $self = shift; if ('CODE' eq ref(my $code = $self->{'_on_destroy'})) { $code->($self); } } 1;
In reply to Re: Per-object DESTROY
by dmitri
in thread Per-object DESTROY
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |