diff options
author | Brian Fraser <fraserbn@gmail.com> | 2013-03-09 15:36:34 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-03-09 15:45:55 -0700 |
commit | 0a520fced6c7f8a21494d4e9c42cd89f3a8ff5a5 (patch) | |
tree | 76eba99905180915f427e735e32889656dc47f5b /toke.c | |
parent | 1b59ab5f69dd4e996646d7ac3fe2a7197899b078 (diff) | |
download | perl-0a520fced6c7f8a21494d4e9c42cd89f3a8ff5a5.tar.gz |
PATCH: [perl #117101] toke.c: Make \$$1 work again.
Commit 3283393 replaced the use of isWORDCHAR (\p{Word}) in scan_ident
with isIDFIRST (\p{XIDS}). Generally this was not troublesome, since
there are other places that deal with variables matching \d, but
one use of isWORDCHAR had given digit variables an unintended special
case:
$$1 meant ${$1}, whereas $$@ or $$* were syntax errors.
This commit restores the special case for \p{POSIX_Digit} variables.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -9281,7 +9281,11 @@ S_scan_ident(pTHX_ char *s, const char *send, char *dest, STRLEN destlen, I32 ck return s; } if (*s == '$' && s[1] && - (isIDFIRST_lazy_if(s+1,is_utf8) || s[1] == '$' || s[1] == '{' || strnEQ(s+1,"::",2)) ) + (isIDFIRST_lazy_if(s+1,is_utf8) + || isDIGIT_A((U8)s[1]) + || s[1] == '$' + || s[1] == '{' + || strnEQ(s+1,"::",2)) ) { return s; } |