CC: | rrt [...] sc3d.org |
Subject: | unlink0 and unlink1: Clarify their status as utility functions |
In this ticket in the Perl 5 RT queue,
https://rt.perl.org/rt3/Ticket/Display.html?id=110898, a contributor
reported confusion about the documentation of 'unlink1'. The
contributor later saw the documentation for unlink1, so the RT ticket
was rejected.
However, I can see the possibility for confusion. I am providing a
patch which should help clarify that unlink1 is a function internal to
File::Temp. (Patch has been pulled against cpan/File-Temp/Temp.pm in
Perl 5 blead.)
Thank you very much.
Jim Keenan
Subject: | Temp.pm.patch |
diff --git a/cpan/File-Temp/Temp.pm b/cpan/File-Temp/Temp.pm
index a2d4ae0..7f43db9 100644
--- a/cpan/File-Temp/Temp.pm
+++ b/cpan/File-Temp/Temp.pm
@@ -27,11 +27,11 @@ C<_can_unlink_opened_file> method should be modified.
=item *
-Are the return values from C<stat> reliable? By default all the
-return values from C<stat> are compared when unlinking a temporary
-file using the filename and the handle. Operating systems other than
-unix do not always have valid entries in all fields. If C<unlink0> fails
-then the C<stat> comparison should be modified accordingly.
+Are the return values from C<stat> reliable? By default all the return values
+from C<stat> are compared when unlinking a temporary file using the filename
+and the handle. Operating systems other than unix do not always have valid
+entries in all fields. If utility function C<File::Temp::unlink0> fails then
+the C<stat> comparison should be modified accordingly.
=item *
@@ -1139,10 +1139,10 @@ sub unlink_on_destroy {
=item B<DESTROY>
-When the object goes out of scope, the destructor is called. This
-destructor will attempt to unlink the file (using C<unlink1>)
-if the constructor was called with UNLINK set to 1 (the default state
-if UNLINK is not specified).
+When the object goes out of scope, the destructor is called. This destructor
+will attempt to unlink the file (using L<unlink1|"unlink1">) if the
+constructor was called with UNLINK set to 1 (the default state if UNLINK is
+not specified).
No error is given if the unlink fails.