develooper Front page | perl.perl5.porters | Postings from March 2003

-A and PERL5OPT

Thread Next
From:
Rafael Garcia-Suarez
Date:
March 10, 2003 08:01
Subject:
-A and PERL5OPT
Message ID:
20030310170100.0665ccc6.rgarciasuarez@free.fr
I'm a bit worried by the fact that arbitrary regular expressions
are allowed as an argument to the -A switch.

So I think either one of those solutions must be chosen :

(a) only allow things that match /(\w|,)+/ after -A (or something)
(b) or disallow -A in PERL5OPT. It's currently allowed.

Personnally I'm in favor of (a) -- I think that -A in PERL5OPT
is more useful that fancy regexp-based activation of assertions
(esp. if we provide an alternative interface via assertions::activate
to use regexps if we want to.)

Opinions ?

-- 
--- perl.c      (revision 900)
+++ perl.c      (working copy)
@@ -1236,7 +1237,7 @@
                d = s;
                if (!*s)
                    break;
-               if (!strchr("DIMUdmtwA", *s))
+               if (!strchr("DIMUdmtw", *s))
                    Perl_croak(aTHX_ "Illegal switch in PERL5OPT: -%c", *s);
                while (++s && *s) {
End of sigpatch.

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