- or download this
package LockedBox;
use Moose;
...
lock_value( %$self, $attr->name )
}
}
- or download this
my $foo = LockedBox->new( bar => 10 );
- or download this
my $foo = LockedBox->new( bar => 10, baz => 100 );
- or download this
$foo->{baz} = 20;
- or download this
$foo->{bar} = 20;