Lvalue Subroutines When accessors define bits of data that change dynamically during the object's lifetime, it sometimes makes sense to define attribute-like access semantics: sub foo : lvalue { my ($self) = @_; $self->{foo}; } Caller says: print $object->foo; # Prints "my foo". $object->foo = "new foo"; # Change foo back.