You can override WHAT with a method, you just have to use a syntax that's not literally .WHAT, like this:
class Test { method WHAT() { say "i'm here" } }; Test."WHAT"();
# → i'm here
You can override WHAT with a method, you just have to use a syntax that's not literally .WHAT, like this:
class Test { method WHAT() { say "i'm here" } }; Test."WHAT"();
# → i'm here