From: Chip Salzenberg Date: Thu, 15 May 1997 22:15:00 +0000 (+1200) Subject: Explain that destruction order is not defined X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=31412f2807c0207e41242206134c82bc4e8c566c;p=p5sagit%2Fp5-mst-13.2.git Explain that destruction order is not defined (this is the same change as commit e195ec09596d2fe0e528026e48bc809e69e1165e, but as applied) --- diff --git a/pod/perltoot.pod b/pod/perltoot.pod index 0c5b418..2f5634c 100644 --- a/pod/perltoot.pod +++ b/pod/perltoot.pod @@ -267,6 +267,9 @@ Because while a constructor is explicitly called, a destructor is not. Destruction happens automatically via Perl's garbage collection (GC) system, which is a quick but somewhat lazy reference-based GC system. To know what to call, Perl insists that the destructor be named DESTROY. +Perl's notion of the right time to call a destructor is not well-defined +currently, which is why your destructors should not rely on when they are +called. Why is DESTROY in all caps? Perl on occasion uses purely uppercase function names as a convention to indicate that the function will