diff options
author | Peter Eisentraut | 2017-04-17 17:49:04 +0000 |
---|---|---|
committer | Peter Eisentraut | 2017-04-17 17:49:34 +0000 |
commit | 0e8286d354520cd8b8ac5e7a963130769f731476 (patch) | |
tree | a6b3347f4e69b97bd3ac12cf12e56fec9f67d678 | |
parent | bf2a691e02d7766f185d9d8e0f092222a5c0a129 (diff) |
Fix perlcritic warnings
-rw-r--r-- | src/common/unicode/generate-norm_test_table.pl | 4 | ||||
-rw-r--r-- | src/common/unicode/generate-unicode_norm_table.pl | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/common/unicode/generate-norm_test_table.pl b/src/common/unicode/generate-norm_test_table.pl index 836d3abbd0..310d32fd29 100644 --- a/src/common/unicode/generate-norm_test_table.pl +++ b/src/common/unicode/generate-norm_test_table.pl @@ -18,9 +18,9 @@ my $output_file = $ARGV[1]; my $output_base = basename($output_file); # Open the input and output files -open my $INPUT, $input_file +open my $INPUT, '<', $input_file or die "Could not open input file $input_file: $!"; -open my $OUTPUT, "> $output_file" +open my $OUTPUT, '>', $output_file or die "Could not open output file $output_file: $!\n"; # Print header of output file. diff --git a/src/common/unicode/generate-unicode_norm_table.pl b/src/common/unicode/generate-unicode_norm_table.pl index 41792afd3e..caf591bb22 100644 --- a/src/common/unicode/generate-unicode_norm_table.pl +++ b/src/common/unicode/generate-unicode_norm_table.pl @@ -16,7 +16,7 @@ my $FH; # Read list of codes that should be excluded from re-composition. my @composition_exclusion_codes = (); -open($FH, "CompositionExclusions.txt") +open($FH, '<', "CompositionExclusions.txt") or die "Could not open CompositionExclusions.txt: $!."; while (my $line = <$FH>) { @@ -32,7 +32,7 @@ close $FH; # and character decomposition mapping my @characters = (); my %character_hash = (); -open($FH, "UnicodeData.txt") or die "Could not open UnicodeData.txt: $!."; +open($FH, '<', "UnicodeData.txt") or die "Could not open UnicodeData.txt: $!."; while (my $line = <$FH>) { # Split the line wanted and get the fields needed: @@ -63,7 +63,7 @@ close $FH; my $num_characters = scalar @characters; # Start writing out the output file -open my $OUTPUT, "> $output_file" +open my $OUTPUT, '>', $output_file or die "Could not open output file $output_file: $!\n"; print $OUTPUT <<HEADER; |