in reply to DESTROY problem
I think the "no error if not found" part only applies to when Perl does it, not when you do it.
You could work around this by using eval:
sub DESTROY { ... cleanup ... eval { $self->SUPER::DESTROY(); }; };
Personally, I simply look at whether the class I'm inheriting from implements a DESTROY method, and if so, I invoke that, and if not, I invoke none. In recent times, I've found inheritance to be too much of a bother anyway and mostly use aggregation and delegation to construct more complex objects.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DESTROY problem
by 7stud (Deacon) on Dec 31, 2010 at 10:52 UTC |