This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Close temporary test file before unlinking (for the sake of Win32)
authorSteve Hay <SteveHay@planit.com>
Thu, 26 Oct 2006 16:26:56 +0000 (16:26 +0000)
committerSteve Hay <SteveHay@planit.com>
Thu, 26 Oct 2006 16:26:56 +0000 (16:26 +0000)
p4raw-id: //depot/perl@29120

lib/Term/UI/t/02_ui.t

index 18a60a4..dbefdce 100644 (file)
@@ -20,7 +20,7 @@ if( $ENV{PERL_CORE} ) {
     close *STDOUT;
     open *STDOUT, ">termui.$$" or diag("Could not open tempfile");
 }
-END { unlink "termui.$$" if $ENV{PERL_CORE} }
+END { close *STDOUT && unlink "termui.$$" if $ENV{PERL_CORE} }
 
 
 ### so T::RL doesn't go nuts over no console