in reply to regex transforms of object attributes

lvalue methods are the way to do it all in one shot (see $foo->bar = 14;). Juerd has even written Attribute::Property so that you can do what you want with validation. You might consider using his module instead of MethodMaker. If you don't need the validation, then just making the method :lvalue is fine.

Depending on the purpose and scope of your program, I'd probably avoid "cheating" and messing around inside the object as Plankton suggests ($obj->{content} =~ s///). It's usually considered bad OO form, as it breaks encapsulation. Of course, in Perl you're always free to break any rules you want!

blokhead