reftype won't handle all cases (e.g. deref-overloading or perl4-style glob passing).sub hashref { eval { \%{$_[0]} } } sub myfunc { hashref($_[0]) or die "myfunc expected a hashref"; }
In reply to Re^3: Being more Assert-ive with Perl
by ysth
in thread Being more Assert-ive with Perl
by stvn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |