|
|
| Syntactic Confectionery Delight | |
| PerlMonks |
Re^2: foreach-loop-local var in subby tobyink (Monsignor) |
| on Jan 21, 2013 at 16:57 UTC ( #1014497=note: print w/ replies, xml ) | Need Help?? |
|
FYI, Perl 5.18 will have experimental implementations of my sub, state sub and our sub. our sub is effectively the same as the existing sub keyword but can also be used to hide my sub subs, a la:
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||