Subject: | [PATCH] in truncate.t, close $tmpfile before opening again |
Date: | Fri, 20 Jun 2014 19:13:46 -0500 |
To: | bug-autodie [...] rt.cpan.org |
From: | "Craig A. Berry" <craigberry [...] mac.com> |
In commit 015efd9e49470c09db5efed3e664795673663252, truncate.t added a new use for $tmpfile, but that file was already open. On VMS, file opens are not, by default, shared, so that results in a failure due to "file currently locked by another user." Very easily fixed by just closing the file after its previous use like so:
--- t/truncate.t;-0 2014-05-28 03:03:11 -0500
+++ t/truncate.t 2014-05-30 09:12:13 -0500
@@ -62,6 +62,8 @@ eval {
is($@, "", "Truncating a normal file should be fine");
+$tmpfh->close;
+
# Time to test truncating via globs.
# Firstly, truncating a closed filehandle should fail.
[end]
Cheers,
Show quoted text
________________________________________
Craig A. Berry
mailto:craigberry@mac.com
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser