Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl allows package names consisting entirely of colons

by LanX (Chancellor)
on Nov 27, 2012 at 16:42 UTC ( #1005880=note: print w/replies, xml ) Need Help??


in reply to Perl allows package names consisting entirely of colons

I'm more surprised about the package NAMESPACE BLOCK syntax which seems to be quite new.

Well hopefully the old Perl4 namespace separator (i.e. Single'Quote ) can't be used the same way ... ;-)

Cheers Rolf

Replies are listed 'Best First'.
Re^2: Perl allows package names consisting entirely of colons
by tobyink (Abbot) on Nov 27, 2012 at 16:47 UTC

    It was introduced in Perl 5.14. Perl 5.12 also introduced package NAME VERSION. The two can be combined, a la:

    package Foo::Bar 1.2 { ...; }
    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005880]
help
Chatterbox?
and a soft breeze sighs...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2016-12-10 04:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (159 votes). Check out past polls.