Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 69210
Status: resolved
Priority: 0/
Queue: CGI

Owner: MARKSTOS [...]
Requestors: cberry [...]

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


Subject: [PATCH] tempfile clean-up
Download (untitled) / with headers
text/plain 322b
There is some code in the DESTROY method to close tempfiles on Windows because they cannot be unlinked while open. The exact same thing is necessary on VMS and the attached patch does that. Before this patch, running the CGI test suite leaves a lot of crud in my temp directory. After this, it's clean as a whistle.
Subject: cgi_tempfile_cleanup.patch
--- lib/;-0 2011-06-09 06:18:35 -0500 +++ lib/ 2011-06-30 14:52:24 -0500 @@ -386,7 +386,7 @@ sub new { # user is still holding any reference to them as well. sub DESTROY { my $self = shift; - if ($OS eq 'WINDOWS') { + if ($OS eq 'WINDOWS' || $OS eq 'VMS') { for my $href (values %{$self->{'.tmpfiles'}}) { $href->{hndl}->DESTROY if defined $href->{hndl}; $href->{name}->DESTROY if defined $href->{name};
Subject: Re: [ #69210] [PATCH] tempfile clean-up
Date: Thu, 30 Jun 2011 16:14:32 -0400
To: bug-CGI [...]
From: Mark Stosberg <mark [...]>
Thanks. I'll plan to apply it. Mark
Committed to git for inclusion in the next release. Mark

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to