Matching simply
A little over ten years ago, when Perl 5.18 was approaching its release date, I released match::simple. This was mostly in response to the smartmatch operator (~~
) being deprecated, but also a solution to the incredibly arcane rules for how the smartmatch operator operated.
match::simple was intended to be... simpler. The operator looks a little funky because it uses some clever trickery to fake being an infix operator:
use match::simple; if ( $this |M| $that ) { ...; }