diff options
author | ville <ville@localhost> | 2009-11-25 22:11:21 +0000 |
---|---|---|
committer | ville <ville@localhost> | 2009-11-25 22:11:21 +0000 |
commit | cfbf4f1ba777fd7f0d974d50814029306b320702 (patch) | |
tree | d6954dd2a878632f4e6fa989a351ef9ae6a75b44 | |
parent | be33d28ba525d34b38fff2ef2a0fa03bf2952b0e (diff) | |
download | markup-validator-cfbf4f1ba777fd7f0d974d50814029306b320702.zip markup-validator-cfbf4f1ba777fd7f0d974d50814029306b320702.tar.gz markup-validator-cfbf4f1ba777fd7f0d974d50814029306b320702.tar.bz2 |
Fix open() related issues flagged by perlcritic.
-rwxr-xr-x | misc/spmpp.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/spmpp.pl b/misc/spmpp.pl index 2a88523..950eaed 100755 --- a/misc/spmpp.pl +++ b/misc/spmpp.pl @@ -4,7 +4,7 @@ # for use in the Validator, from an OpenSP ParserMessages.rc. # (spmpp = "SP Message Pre-Processor") # -# $Id: spmpp.pl,v 1.5 2009-11-24 18:58:59 ville Exp $ +# $Id: spmpp.pl,v 1.6 2009-11-25 22:11:21 ville Exp $ # # @@ -23,16 +23,16 @@ my @msg; # # 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"; # |