Change 11394 by nick@camel-linux on 2001/07/17 07:57:06

        Subject:  Re: [PATCH gv.c] allow ${"1f"} to be non-regex var 
        From:  Jeff 'Japhy' Pinyan <[EMAIL PROTECTED]>
        Date:  Mon, 16 Jul 2001 18:46:53 -0400 (EDT)
        Message-Id:  <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/gv.c#149 edit

Differences ...

==== //depot/perl/gv.c#149 (text) ====
Index: perl/gv.c
--- perl/gv.c.~1~       Tue Jul 17 02:00:07 2001
+++ perl/gv.c   Tue Jul 17 02:00:07 2001
@@ -938,6 +938,17 @@
     case '7':
     case '8':
     case '9':
+       /* ensures variable is only digits */
+       /* ${"1foo"} fails this test (and is thus writeable) */
+       /* added by japhy, but borrowed from is_gv_magical */
+
+       if (len > 1) {
+           const char *end = name + len;
+           while (--end > name) {
+               if (!isDIGIT(*end)) return gv;
+           }
+       }
+
       ro_magicalize:
        SvREADONLY_on(GvSV(gv));
       magicalize:
End of Patch.

Reply via email to