Re: pgindent fails with perl 5.40 - Mailing list pgsql-hackers

From Erik Wienhold
Subject Re: pgindent fails with perl 5.40
Date
Msg-id acd151f0-4548-4ff9-a58e-99f5616dbe22@ewie.name
Whole thread Raw
In response to pgindent fails with perl 5.40  (Erik Wienhold <ewie@ewie.name>)
Responses Re: pgindent fails with perl 5.40
List pgsql-hackers
I wrote:
> 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
toload 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.

Ah, it's intentional:

https://metacpan.org/release/HAARG/perl-5.40.0/view/pod/perldelta.pod#Calling-the-import-method-of-an-unknown-package-produces-a-warning

> Calling the import method of an unknown package produces a warning
> [...]
> It will also detect cases where a user passes an argument when using a
> package that does not provide its own import
> [...]

Because we use fatal warnings, pgindent fails.

-- 
Erik



pgsql-hackers by date:

Previous
From: Erik Wienhold
Date:
Subject: pgindent fails with perl 5.40
Next
From: Fujii Masao
Date:
Subject: Re: Function for listing pg_wal/summaries directory