This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[dummy merge]
authorChip Salzenberg <chip@atlantic.net>
Thu, 15 May 1997 22:15:00 +0000 (10:15 +1200)
committerChip Salzenberg <chip@atlantic.net>
Thu, 15 May 1997 22:15:00 +0000 (10:15 +1200)
This merge exists so that the p5p version of the patch and the applied
version are both in the history

pod/perltoot.pod

index bfe1da2..2f5634c 100644 (file)
@@ -263,14 +263,13 @@ clean-up code is placed in the destructor, which must (in Perl) be called
 DESTROY.
 
 If constructors can have arbitrary names, then why not destructors?
-Because while a constructor is explicitly called, a destructor is not,
-the implication being that Perl either always knows the right time to
-call a destructor, or wants to reserve the right to decide for itself.
-Perl's notion of the "right time" is not well-defined currently,
-which is why your destructors should not rely on when they are called.
+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