Subject: | Is it possible to do not use Scalar::Does as dependency? |
Is it possible to exclude Scalar::Does from dependencies?
Scalar::Does increase memory footprint ~10Mb and depends on a whole family of Types::Tiny::* packages.
This is very hard dependency.
You can write:
Scalar::Util::reftype($a) eq 'ARRAY' || ( Scalar::Util::blessed($a) && overload::Method( $a, '@{}' ) ? 1 : 0 );
instead of:
Scalar::Does::does( $val, 'ARRAY' );
and
Scalar::Util::reftype($a) eq 'HASH' || ( Scalar::Util::blessed($a) && overload::Method( $a, '%{}' ) ? 1 : 0 );
instead of:
Scalar::Does::does( $val, 'HASH' );