[tapx-dev] [commit][276] Replace bareword handle with lexical var
andy at hexten.net
andy at hexten.net
Sun Aug 19 12:51:35 BST 2007
Revision: 276
Author: andy
Date: 2007-08-19 12:51:35 +0100 (Sun, 19 Aug 2007)
Log Message:
-----------
Replace bareword handle with lexical var
Modified Paths:
--------------
trunk/lib/TAP/Parser/Source/Perl.pm
Modified: trunk/lib/TAP/Parser/Source/Perl.pm
===================================================================
--- trunk/lib/TAP/Parser/Source/Perl.pm 2007-08-19 11:09:12 UTC (rev 275)
+++ trunk/lib/TAP/Parser/Source/Perl.pm 2007-08-19 11:51:35 UTC (rev 276)
@@ -173,10 +173,9 @@
$self->switches,
);
- local *TEST;
- open( TEST, $file ) or print "can't open $file. $!\n";
- my $shebang = <TEST>;
- close(TEST) or print "can't close $file. $!\n";
+ open( my $th, $file ) or print "can't open $file. $!\n";
+ my $shebang = <$th>;
+ close $th or print "can't close $file. $!\n";
$self->_croak("Script $file is empty") unless defined $shebang;
More information about the tapx-dev
mailing list