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.