I'm watching Steve Baker's Perl Attributes presentation in Phoenix. He mentions the predefined attribute 'lvalue', which is an alternative to passing an assignment value as a function argument. In a package definition ....
sub value : lvalue { my $self = shift; return $self->{value} } .... $obj->value() = 42; # compare with boring assignment ... $obj->value(42)
Is lvalue useful? are people using it? or is it just a dud?
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
In reply to Is ": lvalue" attribute usefull or something to avoid? by TomDLux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |