On 2019-03-15 05:00, Noah Misch wrote:
> I consider the following style more idiomatic:
>
> {
> local %ENV;
> delete $ENV{PGAPPNAME};
> ...
> }
That doesn't work because the first line clears the entire environment.
What does work is
{
delete local $ENV{PGAPPNAME};
...
}
But that is documented as new in Perl 5.12.0, so we might not be able to
use it. It appears to work in the 5.8.9 I have lying around, so I'm
confused.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services