The stupid question is the question not asked | |
PerlMonks |
Re: how to improve the performance of a perl programby tobyink (Canon) |
on Aug 05, 2013 at 16:52 UTC ( [id://1047934]=note: print w/replies, xml ) | Need Help?? |
Re point #1, the idea is to avoid, say:
... which calls $thing->position twice, with something like this:
... which only calls it once.
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|