Well hopefully the implementation does not change. Yes I know famous last words. But lvalue is an experimental feature. That has its problems too.
<update>It just occured to me that ...
s/foo/bar/g;
... could take place in the class defintion. That wouldn't violate encapsulation would it? All one would have to do is add a method to the class. Something like ...
sub s {
my ( $obj, $pat, $sub ) = @_;
$obj->{'content'} =~ s/$pat/$sub/g;
}
I wonder if it would be possible to use overload ... you know something like ...
use overload
"s" => \&s;
| Plankton: 1% Evil, 99% Hot Gas. |