fix smartmatch warnings on perl >= 5.018