in reply to Half-serious quest for prefix anonymous refs taking

This starts to tickle one of my sore points with Perl. In DBM::Deep, there is a lot of code that says something like:
my $r = Scalar::Util::reftype( $thing ); my $tied; if ( $r eq 'ARRAY' ) { $tied = tied @$r; } elsif ( $r eq 'HASH' ) { $tied = tied %$r; } else { die "How did we get '$r'??\n"; }
There's a number of those problems, but arrays and hashes being so different sucks for me. Frankly, I don't care (nor want to care) about how they're implemented. If I want to ask, I'll ask and each should be able to answer is_hash() and is_array(). But, I shouldn't be forced to deference like that. It sucks.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?