Re: What about Perl autodie?

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, John Naylor <johncnaylorls(at)gmail(dot)com>, Greg Sabino Mullane <htamfids(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: What about Perl autodie?
Date: 2024-02-19 08:42:29
Message-ID: 17708ADC-687F-4F92-BF8C-823B2C7ABDA9@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 19 Feb 2024, at 01:54, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> On 2024-02-14 We 11:52, Peter Eisentraut wrote:

>> A gentler way might be to start using some perlcritic policies like InputOutput::RequireCheckedOpen or the more general InputOutput::RequireCheckedSyscalls and add explicit error checking at the sites it points out. And then if we start using autodie in the future, any inappropriate backpatching of calls lacking error checks would be caught.
>
> Yeah, that should work.

I didn't study the referenced rules but the concept seems sane, so definitely a
+1 on that.

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-02-19 08:49:54 Re: Why is subscription/t/031_column_list.pl failing so much?
Previous Message Andrei Lepikhov 2024-02-19 08:35:19 Re: POC, WIP: OR-clause support for indexes