Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created October 4, 2019 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/8bb07673e933cd2faba26607488a27f0 to your computer and use it in GitHub Desktop.
Save Whateverable/8bb07673e933cd2faba26607488a27f0 to your computer and use it in GitHub Desktop.
Whateverable
2019-10-04T21:42:33Z #perl6 <SmokeMachine> guifa maybe this could help you: `class NotDate is Date { method year(\SELF:) { do if SELF.VAR.of === ::?CLASS { "do something else" } else { SELF.Date::year } } }; my Date $d = NotDate.today; say $d.year; my NotDate $n = NotDate.today; say $n.year`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment