in reply to Re^2: Localizing hash keys in an AoH
in thread Localizing hash keys in an AoH
Indeed, but you don't really need to wait for the guard to go out of scope. It's just a blessed object, so you can call $guard->DESTROY manually any time you like.
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
|
---|
In Section
Seekers of Perl Wisdom