.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.48) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "Devel::OverloadInfo 3" .TH Devel::OverloadInfo 3 2026-10-24 "perl v5.44.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH DESCRIPTION .IX Header "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 them is. .PP .Vb 1 \& if (is_overloaded($class_or_object)) { ... } .Ve .PP Returns a boolean indicating whether the given class or object has any overloading declared. Note that a bare \f(CW\*(C`use overload;\*(C'\fR with no actual operators counts as being overloaded. .PP Equivalent to \&\fBoverload::Overloaded()\fR, but doesn\*(Aqt trigger various bugs associated with it in versions of perl before 5.16. .PP .Vb 1 \& my $info = overload_op_info($class_or_object, $op); .Ve .PP Returns a hash reference with information about the specified overloaded operator of the named class or blessed object. .PP Returns \f(CW\*(C`undef\*(C'\fR if the operator is not overloaded. .PP See "Overloadable Operations" in overload for the available operators. .PP The keys in the returned hash are as follows: .IP class 4 .IX Item "class" The name of the class in which the operator overloading was declared. .IP code 4 .IX Item "code" A reference to the function implementing the overloaded operator. .IP code_name 4 .IX Item "code_name" The fully qualified name of the function implementing the overloaded operator. .IP "method_name (optional)" 4 .IX Item "method_name (optional)" The name of the method implementing the overloaded operator, if the overloading was specified as a named method, e.g. \f(CW\*(C`use overload $op => \*(Aqmethod\*(Aq;\*(C'\fR. .IP "code_class (optional)" 4 .IX Item "code_class (optional)" The name of the class in which the method specified by \f(CW\*(C`method_name\*(C'\fR was found. .IP "value (optional)" 4 .IX Item "value (optional)" For the special \f(CW\*(C`fallback\*(C'\fR key, the value it was given in \f(CW\*(C`class\*(C'\fR. .PP .Vb 1 \& my $info = overload_info($class_or_object); .Ve .PP 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 \f(CW%overload::ops\fR (see "Overloadable Operations" in overload), and the values are the hashes returned by "overload_op_info". .SH CAVEATS .IX Header "CAVEATS" Whether the \f(CW\*(C`fallback\*(C'\fR key exists when it has its default value of \&\f(CW\*(C`undef\*(C'\fR varies between perl versions: Before 5.18 it\*(Aqs there, in later versions it\*(Aqs not. .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 59:" 4 .IX Item "Around line 59:" Unknown directive: =func .IP "Around line 86:" 4 .IX Item "Around line 86:" Unknown directive: =func .IP "Around line 166:" 4 .IX Item "Around line 166:" Unknown directive: =func