sub _ref_check { my ($test,$should_be) = @_; my $ref = ref($test); unless ($ref eq $should_be) { if (length($ref) > 0) { carp ("\n>> $test isn't a reference to a $should_be, but rather a reference to a ".$ref."\n") } else { carp ("\n>> $test isn't an array reference at all, but a SCALAR\n") }# if (defined($refref)) return 0; } # unless ($ref eq $should_be) return 1; } #End of subrotuine _ref_check