Just another Perl shrine | |
PerlMonks |
Re: Why parens?by tobyink (Canon) |
on Feb 07, 2013 at 17:22 UTC ( [id://1017704]=note: print w/replies, xml ) | Need Help?? |
When declaring only one variable, it's mostly an aesthetic choice; but consider declaring multiple variables simultaneously...
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|