|
|
| Just another Perl shrine | |
| PerlMonks |
Re^4: Perl allows package names consisting entirely of colonsby tobyink (Prior) |
| on Nov 27, 2012 at 16:30 UTC ( #1005879=note: print w/ replies, xml ) | Need Help?? |
|
I never meant to imply that it should be disallowed. I was just expressing surprise that it is not disallowed, given that Perl does place limits on what tokens may appear in a package declaration. Why disallow package 123 and package 123:: but allow package ::123? The tokens allowed to follow package are have interesting but seemingly arbitrary restrictions, which have nothing to do with what names are actually usable for naming functions, variables, etc...
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Obfuscated Code
|
|
||||||||||||||||||||