tokuhirom / plenv

Perl binary manager
Other
516 stars 71 forks source link

Not Really An Issue #141

Closed G4143 closed 6 years ago

G4143 commented 6 years ago

Not really an issue but a clarification... I think.

System - Linux Mint Cinnamon

When you set plenv local or global and call 'which perl' it will point to a plenv perl distribution right?

I ask because I can use a plenv perl distro if I call call the perl.pl script with perl but it fails if I chmod the perl script and ./perl.pl.

Basically, if I plan to use a plenv perl distro I must set the plenv distro and then call any perl script with perl instead of ./perl.pl. Is this correct and why wasn't this in the documentation?

From a Perl noob.

Actually. If I change the she-bang line in Perl script to point to the plenv Perl distro then I can chmod the script and ./perl.pl. Like I said, Perl noob.

Grinnz commented 6 years ago

If you want a script to use the first perl in your path when not invoked with a specific perl, use the shebang #!/usr/bin/env perl. Any scripts installed by that perl (e.g. from CPAN) should have an appropriate shebang already.