Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Anonymous Hash in Constructor

by tobyink (Abbot)
on Oct 19, 2012 at 10:39 UTC ( #999906=note: print w/replies, xml ) Need Help??


in reply to Re^2: Anonymous Hash in Constructor
in thread Anonymous Hash in Constructor

Indeed. The two sample constructors I provided are functionally identical. If the Perl compiler were smart enough, it could happily generate the same optree from each (but it currently does not).

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://999906]
help
Chatterbox?
[1nickt]: thezip use Path::Tiny. @paths = path("/foo")-> children; (Excludes "." and ".." automatically.)
[1nickt]: (Also takes a compiled regexp as an arg to filter the list)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2017-03-28 18:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (339 votes). Check out past polls.