sub ^asText { my $self = shift; return sprintf "...", $self.attr1, $self.attr2... } sub ^asAnimal { my $self = shift; return $self.Animal; }