Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.88k stars 530 forks source link

Environment variables are named with `5` #21056

Open leonerd opened 1 year ago

leonerd commented 1 year ago

(Relating to #21055)

Many (all?) of the environment variables that perl looks in or uses for adjusting its behaviour are all named PERL5.... This encodes the major version number 5 into their name, and makes it harder increase that number in future.

In particular, if we were to bump the major version to 7, then it might seem weird to have to

$ PERL5OPT=-MFoo PERL5LIB=/home/whereever/perl7 perl ...
xenu commented 1 year ago

Removing PERL5FOO would be a major breakage for little gain, while having both PERLFOO and PERL5FOO would introduce even more confusion.

IMO that '5' in the names isn't a big deal. We should keep it and document that those variables affect all Perl versions.

leonerd commented 1 year ago

Yeah; that may be a decision we take. It's a bit ugly but ... eh. It doesn't really break anything as such, so perhaps it's fine to leave them. But still we should come to a decision and document what we decided and why.

haarg commented 1 year ago

PERLLIB already exists.

rwp0 commented 1 year ago

Creating PERLOPT etc, and making PERL5OPT a compatibility alias to it sounds good to me.

The same goes for everything else.

rwp0 commented 1 year ago

Although not exactly much related, created: