Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: wantarray alternativeby tobyink (Canon) |
on Jul 10, 2013 at 20:17 UTC ( [id://1043552]=note: print w/replies, xml ) | Need Help?? |
This is quite a concise way of doing things:
This is an insane way of doing things:
Update: Here's another solution using my module returning that allows you to create additional keywords that act like return...
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|