sub does_hash { my $ref = shift @_; return ref( $ref ) and eval { %$ref; 1 }; }