pgindent fails with perl 5.40 - Mailing list pgsql-hackers

From Erik Wienhold
Subject pgindent fails with perl 5.40
Date
Msg-id 2372cd74-11b0-46f9-b28e-8f9627215d19@ewie.name
Whole thread Raw
Responses Re: pgindent fails with perl 5.40
List 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
loadthe 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



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Collation & ctype method table, and extension hooks
Next
From: Erik Wienhold
Date:
Subject: Re: pgindent fails with perl 5.40