summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-12-29 18:01:53 +0100
committerPeter Eisentraut <peter@eisentraut.org>2023-12-29 18:20:00 +0100
commitc5385929593dd8499cfb5d85ac322e8ee1819fd4 (patch)
treedf87a0618dea5cb1d41f0cd9e1faad27320c0438 /src/pl
parent7418767f11d11ca4003ed3e8e96296eabb2acfe1 (diff)
Make all Perl warnings fatal
There are a lot of Perl scripts in the tree, mostly code generation and TAP tests. Occasionally, these scripts produce warnings. These are probably always mistakes on the developer side (true positives). Typical examples are warnings from genbki.pl or related when you make a mess in the catalog files during development, or warnings from tests when they massage a config file that looks different on different hosts, or mistakes during merges (e.g., duplicate subroutine definitions), or just mistakes that weren't noticed because there is a lot of output in a verbose build. This changes all warnings into fatal errors, by replacing use warnings; by use warnings FATAL => 'all'; in all Perl files. Discussion: https://www.postgresql.org/message-id/flat/06f899fd-1826-05ab-42d6-adeb1fd5e200%40eisentraut.org
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plperl/plc_perlboot.pl6
-rw-r--r--src/pl/plperl/plperl_opmask.pl2
-rw-r--r--src/pl/plperl/text2macro.pl2
-rw-r--r--src/pl/plpgsql/src/generate-plerrcodes.pl2
-rw-r--r--src/pl/plpython/generate-spiexceptions.pl2
-rw-r--r--src/pl/tcl/generate-pltclerrcodes.pl2
6 files changed, 8 insertions, 8 deletions
diff --git a/src/pl/plperl/plc_perlboot.pl b/src/pl/plperl/plc_perlboot.pl
index 13298013d39..90c1b7e6679 100644
--- a/src/pl/plperl/plc_perlboot.pl
+++ b/src/pl/plperl/plc_perlboot.pl
@@ -4,7 +4,7 @@
# src/pl/plperl/plc_perlboot.pl
use strict;
-use warnings;
+use warnings FATAL => 'all';
use vars qw(%_SHARED $_TD);
@@ -58,7 +58,7 @@ sub ::encode_array_constructor
package PostgreSQL::InServer; ## no critic (RequireFilenameMatchesPackage)
#>>>
use strict;
- use warnings;
+ use warnings FATAL => 'all';
sub plperl_warn
{
@@ -107,7 +107,7 @@ sub ::encode_array_constructor
package PostgreSQL::InServer::ARRAY;
use strict;
- use warnings;
+ use warnings FATAL => 'all';
use overload
'""' => \&to_str,
diff --git a/src/pl/plperl/plperl_opmask.pl b/src/pl/plperl/plperl_opmask.pl
index 26ac7177701..09dc72d2730 100644
--- a/src/pl/plperl/plperl_opmask.pl
+++ b/src/pl/plperl/plperl_opmask.pl
@@ -3,7 +3,7 @@
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
use strict;
-use warnings;
+use warnings FATAL => 'all';
use Opcode qw(opset opset_to_ops opdesc);
diff --git a/src/pl/plperl/text2macro.pl b/src/pl/plperl/text2macro.pl
index 933632c0df9..7a41da84c67 100644
--- a/src/pl/plperl/text2macro.pl
+++ b/src/pl/plperl/text2macro.pl
@@ -27,7 +27,7 @@ file as capitalized and used as the name of the macro, along with an optional pr
=cut
use strict;
-use warnings;
+use warnings FATAL => 'all';
use Getopt::Long;
diff --git a/src/pl/plpgsql/src/generate-plerrcodes.pl b/src/pl/plpgsql/src/generate-plerrcodes.pl
index f4fd376ef95..03ce58b94e3 100644
--- a/src/pl/plpgsql/src/generate-plerrcodes.pl
+++ b/src/pl/plpgsql/src/generate-plerrcodes.pl
@@ -4,7 +4,7 @@
# Copyright (c) 2000-2023, PostgreSQL Global Development Group
use strict;
-use warnings;
+use warnings FATAL => 'all';
print
"/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n";
diff --git a/src/pl/plpython/generate-spiexceptions.pl b/src/pl/plpython/generate-spiexceptions.pl
index 61b37c35417..090e20472c0 100644
--- a/src/pl/plpython/generate-spiexceptions.pl
+++ b/src/pl/plpython/generate-spiexceptions.pl
@@ -4,7 +4,7 @@
# Copyright (c) 2000-2023, PostgreSQL Global Development Group
use strict;
-use warnings;
+use warnings FATAL => 'all';
print
"/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n";
diff --git a/src/pl/tcl/generate-pltclerrcodes.pl b/src/pl/tcl/generate-pltclerrcodes.pl
index 9c2309108c0..df1ba7d4d45 100644
--- a/src/pl/tcl/generate-pltclerrcodes.pl
+++ b/src/pl/tcl/generate-pltclerrcodes.pl
@@ -4,7 +4,7 @@
# Copyright (c) 2000-2023, PostgreSQL Global Development Group
use strict;
-use warnings;
+use warnings FATAL => 'all';
print
"/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n";