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

People
Owner: MARKSTOS [...] cpan.org
Requestors: cberry [...] cpan.org
Cc:
AdminCc:

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



Subject: [PATCH] tempfile clean-up
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/CGI.pm;-0 2011-06-09 06:18:35 -0500 +++ lib/CGI.pm 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: [rt.cpan.org #69210] [PATCH] tempfile clean-up
Date: Thu, 30 Jun 2011 16:14:32 -0400
To: bug-CGI [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Thanks. I'll plan to apply it. Mark
Committed to git for inclusion in the next release. Mark