in reply to Prepend a Moose attribute when changed

This seems the easiest way to me…

use 5.010; use strict; use warnings; { package Test; use Moose; my $prepend = '/some_string/'; has _appended => (is => 'rw', init_arg => 'appended'); sub appended { $prepend . shift->_appended(@_) } } my $t = Test->new(appended => "this_is_appended_string"); say $t->appended; $t->appended('another_string'); say $t->appended;