in reply to Re^2: Being more Assert-ive with Perl
in thread Being more Assert-ive with Perl

The only real solution to this problem is to see if you can use something as the type of ref you want:
sub hashref { eval { \%{$_[0]} } } sub myfunc { hashref($_[0]) or die "myfunc expected a hashref"; }
reftype won't handle all cases (e.g. deref-overloading or perl4-style glob passing).