After line 53, add this:
die "$type doesn't exist in %{\$hashref}" or isnt a hash ref unless exists $hashref->{$type} && ref $hashref->{$type} eq 'HASH';The point is that the caller is passing $hashref, and @type_order. But one (or more) of the types in @type_order is either not a key in %{$hashref}, or the value of that key is itself not a hashref.
Dave
In reply to Re^5: Not a HASH reference error
by davido
in thread Not a HASH reference error
by briandanderson1977
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |