List Info

Thread: -W for PERL5OPT?




-W for PERL5OPT?
user name
2007-10-06 17:26:22
I've just committed change 32056, which removed A from the
options acceptable
to PERL5OPT. Previously one would get this:

$ PERL5OPT=-A ./perl -e0
Can't emulate -A on #! line.

However, one gets this:

$ PERL5OPT=-W ./perl -e0
Illegal switch in PERL5OPT: -W.

Is there any reason why -W shouldn't be allowed in PERL5OPT?
and -E?
Any other options that might be useful there?

Nicholas Clark

Change 32056 by nicholasentropy on 2007/10/06
22:22:20

	"A" should no longer be in the list of options
acceptable to PERL5OPT,
	now that assertions have been removed.

Affected files ...

... //depot/perl/perl.c#827 edit

Differences ...

==== //depot/perl/perl.c#827 (text) ====

 -1983,7
+1983,7 
 		d = s;
 		if (!*s)
 		    break;
-		if (!strchr("CDIMUdmtwA", *s))
+		if (!strchr("CDIMUdmtw", *s))
 		    Perl_croak(aTHX_ "Illegal switch in PERL5OPT:
-%c", *s);
 		while (++s && *s) {
 		    if (isSPACE(*s)) {

Re: -W for PERL5OPT?
user name
2007-10-08 03:52:49
Nicholas Clark wrote:
> I've just committed change 32056, which removed A from
the options acceptable
> to PERL5OPT. Previously one would get this:
>
> $ PERL5OPT=-A ./perl -e0
> Can't emulate -A on #! line.

I just removed it from docs, too. (change #32063)

> However, one gets this:
>
> $ PERL5OPT=-W ./perl -e0
> Illegal switch in PERL5OPT: -W.
>
> Is there any reason why -W shouldn't be allowed in
PERL5OPT? and -E?
> Any other options that might be useful there?

If you allow -W, you want to allow -X too.

-E can be emulated with -M :

    $ PERL5OPT=-Mfeature=:5.10 bleadperl -e 'given(42)
'
    42

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )