good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^5: Real life uses for closures.by tobyink (Canon) |
on Feb 18, 2013 at 20:20 UTC ( [id://1019392]=note: print w/replies, xml ) | Need Help?? |
I didn't look at the source code at all - I was just referring to the usage examples in the pod.
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|