We don't bite newbies here... much | |
PerlMonks |
Re^3: Anonymous Hash in Constructorby tobyink (Canon) |
on Oct 19, 2012 at 10:39 UTC ( [id://999906]=note: print w/replies, xml ) | Need Help?? |
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'
In Section
Seekers of Perl Wisdom
|
|