We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Quoting Synopsis 2:
The $Package'var syntax is gone. Use $Package::var instead. (Note, however, that identifiers may now contain an apostrophe or hyphen if followed by an "idfirst" letter.)idfirst means a unicode Alpha character (roughly equivalent to \w) and it seems that the Synopsis may be revised. So this seems to allow these kind of declarations: In Rakudo Perl 6, version 2011.07 this doesn't work. Rakudo seems to accept any text, including an empty string, and these all declare the same $ and a second declarations give a diagnostic like:
(Re: the spec): Do I have the quotish syntax correct? Is there test code at which to look? Is this meant to apply to my identifiers? Subroutine and method identfiers? What is the rationale for this flexibility in identifiers? I can see how language design/evolution and interfacing with other languages may be enhanced, but I wonder if I am missing some intended utility. Is there supposed to be a $ variable in any context?
Be well, In reply to Perl6: S2 identifier and $ special var questions by rir
|
|