http://www.perlmonks.org?node_id=1023862


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