|
|
| P is for Practical | |
| PerlMonks |
Re^3: Class::Accessor and Damian's PBPby TheDamian (Priest) |
| on Feb 25, 2006 at 20:09 UTC ( #532799=note: print w/ replies, xml ) | Need Help?? |
|
Whenever your setter needs to be normalized to a different value lvalue accessors don't cut it.Well...that certainly used to be the case. Indeed, the fact that you have to employ the complexities of tied proxy variables to retain control when using lvalue accessors, is precisely why I cautioned against lvalue accessors in "Perl Best Practices". But last week I released the latest version of the Contextual::Return module, with which you can now hide all the complexity of tied proxies behind two simple LVALUE, and RVALUE blocks. For example:
With this functionality now available, I'm seriously reconsidering my long-held objections to lvalue accessors. Damian
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||