diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-03-09 22:01:28 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-03-09 22:01:28 +0000 |
commit | 32d45c1d3bb497e6d65453056058531c637f7772 (patch) | |
tree | 558239c7e1ea66b30cd8864ade3dfb29e2b8b93f /toke.c | |
parent | 5ef5d7584e52b8ae47b9fe227608cf8da8828e4d (diff) | |
download | perl-32d45c1d3bb497e6d65453056058531c637f7772.tar.gz |
Superior *printf-fu lets us avoid modifying source code.
p4raw-id: //depot/perl@27452
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -1089,15 +1089,10 @@ S_check_uni(pTHX) if ((t = strchr(s, '(')) && t < PL_bufptr) return; - /* XXX Things like this are just so nasty. We shouldn't be modifying - source code, even if we realquick set it back. */ if (ckWARN_d(WARN_AMBIGUOUS)){ - const char ch = *s; - *s = '\0'; Perl_warner(aTHX_ packWARN(WARN_AMBIGUOUS), - "Warning: Use of \"%s\" without parentheses is ambiguous", - PL_last_uni); - *s = ch; + "Warning: Use of \"%.*s\" without parentheses is ambiguous", + (int)(s - PL_last_uni), PL_last_uni); } } |