Devel::OverloadInfo - introspect overloaded operators
version 0.003
Devel::OverloadInfo returns information about overloaded operators for a given class (or object), including where in the inheritance hierarchy the overloads are declared and where the code implementing it is.
my $info = overload_info($class_or_object);
Returns a hash reference with information about all the overloaded operators of the argument, which can be either a class name or a blessed object. The keys are the overloaded operators, as specified in %overload::ops (see "Overloadable Operations" in overload).
%overload::ops
The name of the class in which the operator overloading was declared.
A reference to the function implementing the overloaded operator.
The name of the function implementing the overloaded operator, as returned by sub_fullname in Sub::Identify.
sub_fullname
The name of the method implementing the overloaded operator, if the overloading was specified as a named method, e.g. use overload $op => 'method';.
use overload $op => 'method';
The name of the class in which the method specified by method_name was found.
method_name
For the special fallback key, the value it was given in class.
fallback
class
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
This software is copyright (c) 2014 by Dagfinn Ilmari Mannsåker.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Devel::OverloadInfo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::OverloadInfo
CPAN shell
perl -MCPAN -e shell install Devel::OverloadInfo
For more information on module installation, please visit the detailed CPAN module installation guide.