diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-18 20:19:25 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-18 20:19:25 +0000 |
commit | 8f8cf39ca802a67cf132f9179bbf212ddb1ec64e (patch) | |
tree | 3a2a1750ff051e18f93335faab7c32354102ca77 /toke.c | |
parent | ca585e4dbaf85f4268cfbda9a6899be6dec77130 (diff) | |
download | perl-8f8cf39ca802a67cf132f9179bbf212ddb1ec64e.tar.gz |
Document the "Unicode in package/sub names" problem;
a microfix in toke.c towards the final goal (the fix
removes the need to have quotes around Unicode package
names when calling a method on them)
p4raw-id: //depot/perl@17286
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1870,7 +1870,7 @@ S_intuit_more(pTHX_ register char *s) * Method if it's "foo $bar" * Not a method if it's really "print foo $bar" * Method if it's really "foo package::" (interpreted as package->foo) - * Not a method if bar is known to be a subroutne ("sub bar; foo bar") + * Not a method if bar is known to be a subroutine ("sub bar; foo bar") * Not a method if bar is a filehandle or package, but is quoted with * => */ @@ -3913,6 +3913,10 @@ Perl_yylex(pTHX) CLINE; yylval.opval = (OP*)newSVOP(OP_CONST, 0, sv); yylval.opval->op_private = OPpCONST_BARE; + /* UTF-8 package name? */ + if (UTF && !IN_BYTES && + is_utf8_string((U8*)SvPVX(sv), SvCUR(sv))) + SvUTF8_on(sv); /* And if "Foo::", then that's what it certainly is. */ |