mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-19 06:43:23 +02:00
We've had a mixture of the warnings pragma, the -w switch on the shebang line, and no warnings at all. This patch removes the -w swicth and add the warnings pragma to all perl sources missing it. It raises the severity of the TestingAndDebugging::RequireUseWarnings perlcritic policy to level 5, so that we catch any future violations. Discussion: https://postgr.es/m/20200412074245.GB623763@rfd.leadboat.com
29 lines
389 B
Perl
Executable File
29 lines
389 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
# this script will sort any table with the segment data type in its last column
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
my @rows;
|
|
|
|
while (<>)
|
|
{
|
|
chomp;
|
|
push @rows, $_;
|
|
}
|
|
|
|
foreach (
|
|
sort {
|
|
my @ar = split("\t", $a);
|
|
my $valA = pop @ar;
|
|
$valA =~ s/[~<> ]+//g;
|
|
@ar = split("\t", $b);
|
|
my $valB = pop @ar;
|
|
$valB =~ s/[~<> ]+//g;
|
|
$valA <=> $valB
|
|
} @rows)
|
|
{
|
|
print "$_\n";
|
|
}
|