class Elf is Character {
...
}
class Drow is Elf {
...
}
class Human is Character {
...
}
####
class Thief is Profession {
...
}
my Elf $elf .= new(Thief.new);
##
##
class Elf is Character {
has $:profession;
method new(Class $class: Profession $profession) {
$:profession = $profession;
# how the heck do I access the instance from within new()?
$profession.race($_); # certainly incorrect syntax
}
...
}
##
##
class Elf is Character does Infravision {
...
}
class Gnome is Character does Infravision {
...
}