pgindent fails with perl 5.40
Erik Wienhold <ewie@ewie.name>
From: Erik Wienhold <ewie@ewie.name>
To: pgsql-hackers@postgresql.org
Date: 2024-10-08T01:25:46Z
Lists: pgsql-hackers
I get this error when running pgindent with perl 5.40:
Attempt to call undefined import method with arguments ("devnull") via package "File::Spec" (Perhaps you forgot to load the package?) at src/tools/pgindent/pgindent line 10.
BEGIN failed--compilation aborted at src/tools/pgindent/pgindent line 10.
It definitely worked with perl 5.38 before. Not sure if something's
wrong on my side. Is anybody else already using 5.40? For the moment,
I just changed the File::Spec import to make it work:
diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent
index 48d83bc434..028d057ea4 100755
--- a/src/tools/pgindent/pgindent
+++ b/src/tools/pgindent/pgindent
@@ -7,7 +7,7 @@ use warnings FATAL => 'all';
use Cwd qw(abs_path getcwd);
use File::Find;
-use File::Spec qw(devnull);
+use File::Spec;
use File::Temp;
use IO::Handle;
use Getopt::Long;
--
Erik