Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement