What about Perl autodie? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject What about Perl autodie?
Date
Msg-id 88b7d4f2-46d9-4cc7-b1f7-613c90f9a76a@eisentraut.org
Whole thread Raw
Responses Re: What about Perl autodie?
List pgsql-hackers
I came across the Perl autodie pragma 
(https://perldoc.perl.org/autodie).  This seems pretty useful; is this 
something we can use?  Any drawbacks?  Any minimum Perl version?

Attached is a sample patch of the kind of thing I'd be interested in. 
The existing error handling of file operations in Perl is pretty 
cumbersome, and this would simplify that.

Btw., here is a sample error message from autodie:

Can't open '../src/include/mb/pg_wchar.h' for reading: 'No such file or 
directory' at ../src/include/catalog/../../backend/catalog/genbki.pl 
line 391

which seems as good or better than the stuff we produce manually.
Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Commitfest 2024-01 first week update
Next
From: Daniel Gustafsson
Date:
Subject: Re: Commitfest 2024-01 first week update