Overloading in Perl / Using overload.pm
Magical Autogeneration
You don't need to define all of these operations
Perl can autogenerate many of them
++
can be derived from
+
+=
can be derived from
+
-
(unary) can be derived from
-
(binary)
All numeric comparisons can be derived from
<=>
All string comparisons can be derived from
cmp
[
Title Page
] [
TOC
] [
Prev
] [
Next
]
Page 23 of 31