in reply to Extending LValuable Subs with Tied Variables
This module was the result of a discussion in comp.lang.perl.misc.require Tie::OneOff; package cool; sub name : lvalue { my $self = shift; +Tie::OneOff->lvalue({ STORE => sub { my $val = shift; # Do whatever $self->{NAME} = $val; }, FETCH => sub { $self->{NAME}; }, }); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Extending LValuable Subs with Tied Variables
by husker (Chaplain) on Jun 24, 2004 at 20:49 UTC |