in reply to Re: Single accessor/mutator idiom in Perl5, Perl6 and Python
in thread Single accessor/mutator idiom in Perl5, Perl6 and Python
You can do it that way, but see lvalue considered harmful... for some reasons why it may be a bad idea.
Jeurd's Attribute::Property is worth investigating if you like the lvalue style. It resolves some of the problems of lvalue subs at the expense of some tied objects behind the scenes.
|
|---|