GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DEVEL::OVERLOADINFO (3)

.ds Aq ’

NAME

Devel::OverloadInfo - introspect overloaded operators

CONTENTS

VERSION

version 0.004

DESCRIPTION

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.

FUNCTIONS

    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_info



    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).
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 name of the function implementing the overloaded operator, as returned by sub_fullname in Sub::Identify.
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.

CAVEATS

Whether 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.

AUTHOR

Dagfinn Ilmari Mannsaaker <ilmari@ilmari.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Dagfinn Ilmari Mannsaaker.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DEVEL::OVERLOADINFO (3) 2015-08-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.