On Sun May 01 15:50:43 2011, sprout wrote: > On Fri Jul 18 12:44:06 2003, robert wrote: > > > > ISO8--%%- [ON] Wanderlust: %p5p {T}(0/0/148) > > (Summary)----L142--C0--Bot---- > > From: Tony Bowden <tony@kasei.com> > > To: perl5-porters@perl.org > > Cc: mjd@plover.com > > Subject: Bug #6278: Explict call to DESTROY considered harmful > > Date: Fri, 18 Jul 2003 19:15:19 +0100 > > > > > > http://bugs6.perl.org/rt2/Ticket/Display.html?id=6278 > > > > MJD considered changing perltoot to turn "Explicitly calling DESTROY is > > also possible, but is usually never needed." into something more strongly > > warning against ever doing it. > > > > His original report never made it to p5p, but Damian's response did, > > thus triggering a longish thread on what was wrong with perlbug. > > > > However this left the bug report itself hanging. > > > > As Damian pointed out, you may need to call DESTROY directly when > > inheriting. > > > > This leaves 2 main options: > > > > 1) Leave everything as is, and close the bug. > > > > 2) Add something to the docs that changes the above line into something > > akin to: > > > > Explicitly calling DESTROY should be avoided, other than when calling > > SUPER::DESTROY. > > > > > > Thoughts/comments? > > Sometimes it’s necessary to call destructors pre-emptively in an END > block, if they rely on the presence of other objects. But in such cases, > one must ensure that the destructors are idempotent (e.g., return if > $self->{destroyed}++). Well, perltoot doesn't exist anymore, and there's nothing about calling DESTROY directly in perlobj and perlootut anymore, so maybe this ticket can be marked as resolved. Though it would be nice if a executive summary of this thread made it into perlobj. --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=6278Thread Previous | Thread Next