develooper Front page | perl.perl5.porters | Postings from July 2003

Bug #6278: Explict call to DESTROY considered harmful

From:
Tony Bowden
Date:
July 18, 2003 11:15
Subject:
Bug #6278: Explict call to DESTROY considered harmful
Message ID:
20030718181519.GC24048@soto.kasei.com

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?

Tony




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About