sub foo { isa( $_[0], 'HASH' ) ? _foo_hash( $_[0] ) : _foo_scalar( $_[0] ); }