develooper Front page | perl.perl5.porters | Postings from December 2018

Re: [perl #133669] Silently ignores commonly-misspelled PERL5OPTSenvironment variable

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
December 7, 2018 07:17
Subject:
Re: [perl #133669] Silently ignores commonly-misspelled PERL5OPTSenvironment variable
Message ID:
20181207081717.24d0a571@pc09.procura.nl
On Thu, 06 Dec 2018 12:28:04 -0800, "James E Keenan via RT" <perlbug-followup@perl.org> wrote:

> On Mon, 19 Nov 2018 17:07:44 GMT, leonerd@leonerd.org.uk wrote:
> > I often forget the name of the variable and get confused when (e.g.)
> > 
> > $ PERL5OPTS=-MDevel::Cover prove -r
> > 
> > doesn't work. The variable name I wanted was PERL5OPT.
> > 
> > I wonder if core could add a little
> > 
> > if (getenv ("PERL5OPTS"))
> >     warn "PERL5OPTS is set; did you mean to set PERL5OPT instead?";
> 
> If you could propose a patch (including a test), that would probably
> move discussion forward.

Maybe perl6 people could help/chime in

$ perl6 -e'my $perl5opt = "monkey"; say $perl5opts'
===SORRY!=== Error while compiling -e
Variable '$perl5opts' is not declared. Did you mean '$perl5opt'?
at -e:1
------> my $perl5opt = "monkey"; say ⏏$perl5opts

So they already have the feature to do it for variables, why not
steal/borrow their logic for our environmental variables

And that could trigger someone else to do it for variables in perl5
too :)

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.29   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous | 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