|
NAMEDevel::OverloadInfo - introspect overloaded operatorsVERSIONversion 0.007DESCRIPTIONDevel::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 them is.FUNCTIONSis_overloadedif (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_infomy $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:
overload_infomy $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". CAVEATSWhether the "fallback" key exists when it has its default value of "undef" varies between perl versions: Before 5.18 it's there, in later versions it's not.AUTHORDagfinn Ilmari Mannsåker <ilmari@ilmari.org>COPYRIGHT AND LICENSEThis 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.
Visit the GSP FreeBSD Man Page Interface. |