use strict; use warnings; use Test::More; { package Thing; use Moose; has attr => (is => 'ro'); } { package ThingWithRef; use Moose; has attr => (is => 'ro'); sub translate_to_dutch { my $self = shift; ${ $self->attr } =~ s/e/a/; } } my $obj1 = Thing->new(attr => 'Hello'); my $obj2 = ThingWithRef->new(attr => \$obj1->attr); $obj2->translate_to_dutch; is($obj1->attr, 'Hallo'); done_testing;