http://www.perlmonks.org?node_id=219987


in reply to What the [sub]in 'L value do they have?

Since I wrote "lvalue considered harmful..." you can probably guess how much I use them :-)

My ideal would be to be able to separate setting & getting into separate subs like in Pop-11 so you could do:

sub foo { my $self = shift; $self->{foo}; }; sub :updater foo { my ($self, $val) = @_; $self->{foo} = $val; }; print "foo is ", $self->foo, "\n"; $self->foo = 42;

Having this sort of structure keeps the getting and setting logic nice and clear, and (in an ideal world) you would be able to override the setter/getter subroutines separately in subclasses.

Probably a complete sod to implement tho' :-)