Another interesting #perl module by @leont : https://metacpan.org/pod/Magic::Check. You can do this:
use Magic::Check;
use Types::Standard 'Int';
check_variable(my $var = 1, Int);
$var = "abc"; # this will throw
We're getting great momentum for having data checks in the perl core. @leonerd even threatened to just go ahead and implement something.
I'm really looking forward to this!