LV
view release on metacpan or search on metacpan
lib/LV/Backend/Tie.pm view on Meta::CPAN
my $class = shift;
my ($get, $set) = @_;
unless ($set && $get)
{
my $caller = (caller(2))[3];
$get ||= sub { require Carp; Carp::croak("$caller is writeonly") };
$set ||= sub { require Carp; Carp::croak("$caller is readonly") };
}
bless [$get, $set] => $class;
}
sub FETCH
{
&{shift->[0]};
}
sub STORE
{
&{shift->[1]};
( run in 0.291 second using v1.01-cache-2.11-cpan-3b35f9de6a3 )