pgindent fails with perl 5.40

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pgindent fails with perl 5.40
Date: 2024-10-08 01:25:46
Message-ID: 2372cd74-11b0-46f9-b28e-8f9627215d19@ewie.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-10-08 01:48:49 Re: [PATCH] pg_permissions
Previous Message Michael Paquier 2024-10-08 01:19:43 Re: Expand applicability of aggregate's sortop optimization