This is a chapter in Perl New Features, a book from Perl School that you can buy on LeanPub or Amazon. Your support helps me to produce more content.
This feature is stable in v5.36
Perl v5.32 adds Paul Evans’s infix isa
operator—the “class instance operator” as an experimental feature. It still has some issues to work out which prevent its use at the moment, but it looks promising. It subverts how the UNIVERSAL::isa
does its job and breaks that in the process. As an experimental feature, that’s fine, but you shouldn’t use this until that’s worked out.
There’s no word on versions for can
or does
.
One of the delightful things to note about this is addition is that it is one of the features whose development took place almost entirely through a GitHub issue and pull request. GitHub is now the primary repository for the Perl code, and has been since October 2019. This is a feature that I’ll want to use right away in new production code.