This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Ensure temp directories are cleaned up.
authorJames E Keenan <jkeenan@cpan.org>
Thu, 26 Apr 2018 20:51:39 +0000 (16:51 -0400)
committerJames E Keenan <jkeenan@cpan.org>
Tue, 1 May 2018 12:01:49 +0000 (08:01 -0400)
Tux reported that on certain platforms File::Temp::tempdir(CLEANUP => 1) was
not cleaning up after itself properly.  Guarantee that this cleanup takes
place in and END block.

Thread:
https://www.nntp.perl.org/group/perl.perl5.porters/2018/04/msg250757.html

dist/PathTools/t/cwd_enoent.t

index b9addde..8f3a1fb 100644 (file)
@@ -47,4 +47,6 @@ foreach my $type (qw(regular perl)) {
 
 chdir $tmp or die "$tmp: $!";
 
+END { chdir $tmp; }
+
 1;