is_overloaded
if (is_overloaded($class_or_object)) { ... }
Returns a boolean indicating whether the given class or object has any overloading declared. Note that a
bare "use overload;" with no actual operators counts as being overloaded.
Equivalent to overload::Overloaded(), but doesn't trigger various bugs associated with it in versions of
perl before 5.16.
overload_op_info
my $info = overload_op_info($class_or_object, $op);
Returns a hash reference with information about the specified overloaded operator of the named class or
blessed object.
Returns "undef" if the operator is not overloaded.
See "Overloadable Operations" in overload for the available operators.
The keys in the returned hash are as follows:
class
The name of the class in which the operator overloading was declared.
code
A reference to the function implementing the overloaded operator.
code_name
The fully qualified name of the function implementing the overloaded operator.
method_name (optional)
The name of the method implementing the overloaded operator, if the overloading was specified as a
named method, e.g. "use overload $op => 'method';".
code_class (optional)
The name of the class in which the method specified by "method_name" was found.
value (optional)
For the special "fallback" key, the value it was given in "class".
overload_info
my $info = overload_info($class_or_object);
Returns a hash reference with information about all the overloaded operators of specified class name or
blessed object. The keys are the overloaded operators, as specified in %overload::ops (see "Overloadable
Operations" in overload), and the values are the hashes returned by "overload_op_info".