diff options
author | Brian Fraser <fraserbn@gmail.com> | 2011-08-06 10:35:22 +0100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-03-22 20:23:54 -0700 |
commit | 4bca4ee0177ebddff4006e8fdc3f36628349ae11 (patch) | |
tree | 050ee100934ab151b505fe57adfde5d5fffa4880 | |
parent | 3c54b17ac754f03829f63c4ed668e555e98f7623 (diff) | |
download | perl-4bca4ee0177ebddff4006e8fdc3f36628349ae11.tar.gz |
toke.c: 'No package name allowed for variable %s in "our"' cleanup.
-rw-r--r-- | t/uni/parser.t | 10 | ||||
-rw-r--r-- | toke.c | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/t/uni/parser.t b/t/uni/parser.t index a3e3477d9d..6530b66cc3 100644 --- a/t/uni/parser.t +++ b/t/uni/parser.t @@ -7,7 +7,7 @@ BEGIN { require './test.pl'; } -plan (tests => 41); +plan (tests => 42); use utf8; use open qw( :utf8 :std ); @@ -116,4 +116,10 @@ is ${"main::\345\225\217"}, undef, "..and using the encoded form doesn't"; eval "$_ Foo $x = 1;"; like $@, qr/No such class Foo/u, "'No such class' warning for $_ is UTF-8 clean"; } -}
\ No newline at end of file +} + +{ + local $@; + eval "our \$main::\x{30cb};"; + like $@, qr!No package name allowed for variable \$main::\x{30cb} in "our"!, "'No such package name allowed for variable' is UTF-8 clean"; +} @@ -8472,9 +8472,9 @@ S_pending_ident(pTHX) if (PL_in_my) { if (PL_in_my == KEY_our) { /* "our" is merely analogous to "my" */ if (has_colon) - yyerror(Perl_form(aTHX_ "No package name allowed for " + yyerror_pv(Perl_form(aTHX_ "No package name allowed for " "variable %s in \"our\"", - PL_tokenbuf)); + PL_tokenbuf), UTF ? SVf_UTF8 : 0); tmp = allocmy(PL_tokenbuf, tokenbuf_len, UTF ? SVf_UTF8 : 0); } else { |