in reply to Moo-Type checking example from Perl Maven: What should be the expected result?

Are you sure you copied the code correctly? I'm getting the expected error. To get the error about 22, I had to change !~ to =~, or change the if to unless.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,