- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 25 Nov 2009 22:11:23 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/misc
In directory hutz:/tmp/cvs-serv18857/misc
Modified Files:
spmpp.pl
Log Message:
Fix open() related issues flagged by perlcritic.
Index: spmpp.pl
===================================================================
RCS file: /sources/public/validator/misc/spmpp.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- spmpp.pl 24 Nov 2009 18:58:59 -0000 1.5
+++ spmpp.pl 25 Nov 2009 22:11:21 -0000 1.6
@@ -23,16 +23,16 @@
#
# Snarf OpenSP's ParserMessages.rc and populate @msg.
my $msgfile = $ARGV[0] || "/usr/local/validator/htdocs/config/verbosemsg.rc";
-open FH, $msgfile or
+open my $fh, '<', $msgfile or
die "Can't open OpenSP ParserMessages file '$msgfile': $!";
-while (<FH>) {
+while (<$fh>) {
next if /^\s*$/;
my ($id, $s) = split /, /, $_, 2;
$id += 0; # Force numerical (kill leading space)...
chomp $s; # Strip newline from end of message...
push @msg, [$id, $s];
}
-close FH;
+close $fh;
print <<"EOF";
#
Received on Wednesday, 25 November 2009 22:11:32 UTC