Tilly, that's actually very similar to what I've been doing in the meantime to work around this. I just wanted to look for a solution that would let me use the cleaner looking attributes
Here is an actual example of my work around:
sub _is_inactive {
my( $self ) = @ARG;
my( $realword ) = $self->realword;
return $realword =~ $self->CHEVRON_QR;
}
install_sub( {
code => __PACKAGE__->hash_instance_cache( 'sub' => '_is_inactive'
+),
as => 'is_inactive' } );
As you may have guessed, I'm using all this to automatically cache the return value of the sub in the hash based object instance. A different issue altogether I'm sure ;) I just found myself working with references to hash values which can be repetitive and error prone so I abstracted it into an attribute but the that is also abstracted into something that can be used separately from attribute handlers.