diff options
author | Brian Fraser <fraserbn@gmail.com> | 2011-08-06 08:05:16 +0100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-03-22 20:23:53 -0700 |
commit | 4c01a014641ade309fdf32a66b1e9939f10566ac (patch) | |
tree | c21b0e8c595038d10310090161c88431bc834ede | |
parent | e2f06df0a8c96f7d9a5f3214fc5bf2daf34588c3 (diff) | |
download | perl-4c01a014641ade309fdf32a66b1e9939f10566ac.tar.gz |
toke.c: 'You need to quote %s' cleanup.
-rw-r--r-- | t/lib/warnings/toke | 20 | ||||
-rw-r--r-- | toke.c | 8 |
2 files changed, 25 insertions, 3 deletions
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index 4c6c8fe6a2..2214005260 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -237,6 +237,26 @@ EXPECT You need to quote "fred" at - line 3. ######## # toke.c +use utf8; +use open qw( :utf8 :std ); +use warnings 'syntax' ; +sub frèd {} ; $SIG{TERM} = frèd; +no warnings 'syntax' ; +$SIG{TERM} = frèd; +EXPECT +You need to quote "frèd" at - line 5. +######## +# toke.c +use utf8; +use open qw( :utf8 :std ); +use warnings 'syntax' ; +sub ふれど {} ; $SIG{TERM} = ふれど; +no warnings 'syntax' ; +$SIG{TERM} = ふれど; +EXPECT +You need to quote "ふれど" at - line 5. +######## +# toke.c use warnings 'syntax' ; @a[3] = 2; @a{3} = 2; @@ -6184,10 +6184,12 @@ Perl_yylex(pTHX) &len); while (isSPACE(*t)) t++; - if (*t == ';' && get_cvn_flags(tmpbuf, len, 0)) + if (*t == ';' + && get_cvn_flags(tmpbuf, len, UTF ? SVf_UTF8 : 0)) Perl_warner(aTHX_ packWARN(WARN_SYNTAX), - "You need to quote \"%s\"", - tmpbuf); + "You need to quote \"%"SVf"\"", + SVfARG(newSVpvn_flags(tmpbuf, len, + SVs_TEMP | (UTF ? SVf_UTF8 : 0)))); } } } |