Skip Menu |

This queue is for tickets about the autodie CPAN distribution.

Report information
The Basics
Id: 96609
Status: resolved
Priority: 0/
Queue: autodie

People
Owner: Nobody in particular
Requestors: craigberry [...] mac.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
On Fri Jun 20 20:13:57 2014, craigberry@mac.com wrote: Show quoted text
> 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: > > [...] > > Cheers, > ________________________________________ > Craig A. Berry > [...]
Hi Craig, Your patch has been merged in to the autodie master branch and is expected to be released as a part of 2.26.
Hi, Thanks for reporting the issue. :) A fix for this bug was included in the v2.26 release (uploaded to CPAN today). Please have a look at it and let us know if v2.26 works as intended. Thanks, ~Niels