Closed jackdeguest closed 9 months ago
Can someone please explain what the advantage of Scalar::Util::reftype
over ref
has? Its docs don't have a comparison.
Thanks!
Can someone please explain what the advantage of
Scalar::Util::reftype
overref
has? Its docs don't have a comparison.
Array objects. ref
will return the object class whereas Scalar::Util::reftype
will return the actual type.
Thanks!
Changing to reftype means it will violate the encapsulation of any object that happens to be array based.
Changing to reftype means it will violate the encapsulation of any object that happens to be array based.
Can you please clarify your thoughts in the context of the code in question?
URI::_query uses
ref
to check if a value is an array, but since the URI distribution uses alreadyScalar::Util
, I propose it usesScalar::Util::reftype
instead.