summaryrefslogtreecommitdiff
path: root/contrib/intarray
diff options
context:
space:
mode:
authorPeter Eisentraut2017-03-27 02:24:13 +0000
committerPeter Eisentraut2017-03-27 12:18:22 +0000
commitfacde2a98f0b5f7689b4e30a9e7376e926e733b8 (patch)
treeab8b2cc1b2bd47b7db5e2def26d8eca4ce6ca438 /contrib/intarray
parentde4da168d57de812bb30d359394b7913635d21a9 (diff)
Clean up Perl code according to perlcritic
Fix all perlcritic warnings of severity level 5, except in src/backend/utils/Gen_dummy_probes.pl, which is automatically generated. Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Diffstat (limited to 'contrib/intarray')
-rwxr-xr-xcontrib/intarray/bench/create_test.pl20
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/intarray/bench/create_test.pl b/contrib/intarray/bench/create_test.pl
index 1323b31e4d..f3262df05b 100755
--- a/contrib/intarray/bench/create_test.pl
+++ b/contrib/intarray/bench/create_test.pl
@@ -15,8 +15,8 @@ create table message_section_map (
EOT
-open(MSG, ">message.tmp") || die;
-open(MAP, ">message_section_map.tmp") || die;
+open(my $msg, '>', "message.tmp") || die;
+open(my $map, '>', "message_section_map.tmp") || die;
srand(1);
@@ -42,16 +42,16 @@ foreach my $i (1 .. 200000)
}
if ($#sect < 0 || rand() < 0.1)
{
- print MSG "$i\t\\N\n";
+ print $msg "$i\t\\N\n";
}
else
{
- print MSG "$i\t{" . join(',', @sect) . "}\n";
- map { print MAP "$i\t$_\n" } @sect;
+ print $msg "$i\t{" . join(',', @sect) . "}\n";
+ map { print $map "$i\t$_\n" } @sect;
}
}
-close MAP;
-close MSG;
+close $map;
+close $msg;
copytable('message');
copytable('message_section_map');
@@ -79,8 +79,8 @@ sub copytable
my $t = shift;
print "COPY $t from stdin;\n";
- open(FFF, "$t.tmp") || die;
- while (<FFF>) { print; }
- close FFF;
+ open(my $fff, '<', "$t.tmp") || die;
+ while (<$fff>) { print; }
+ close $fff;
print "\\.\n";
}