There may be a better way, but you can do this by overriding new (and removing the title attribute from Employee::Former):
class Employee::Former is Employee { method new(*%params) { %params<title> //= 'Team Member'; return callwith(|%params); } method name_and_title { my $old = callsame; return "$old (Former)"; } }
Good Day,
Dean
In reply to Re: Raku question: "Moose is Perl", but it sure ain't Raku.
by duelafn
in thread Raku question: "Moose is Perl", but it sure ain't Raku.
by Cow1337killr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |