develooper Front page | perl.perl5.porters | Postings from September 2019

Rethinking PERL_xxx env vars.

Thread Next
From:
demerphq
Date:
September 16, 2019 09:24
Subject:
Rethinking PERL_xxx env vars.
Message ID:
CANgJU+WnZhoasRt8Ogirqw39Z48s4Y179VHaLUQYY=7UzhBO+w@mail.gmail.com
I recently encountered an annoyance with perl env vars, where setting one
of the vars for development purposes broke git, which uses perl for its
tooling.

I then did some digging and determined that there is no way to tell perl
"ignore the environment', nor is there a way to have per application
settings without using a wrapper of some form to clean the env.

I think this is suboptimal.

So I was thinking we should have a facility that a) causes perl to ignore
the environment[1], and b) that allows one to specify a prefix to use when
reading env vars. Thus git could set the prefix to GIT_ which would mean
perl would read GIT_PERL5LIB etc.

I am not entirely certain how this would work, perhaps an option on the
shebang line. Ideas welcome.

Yves
[1] despite the temptation we probably shouldn't name this after any of the
many political movements that also ignore the environment. 😁

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About