Overloading in Perl / Using overload.pm
Defining Constant Handlers
Define a constant handler hash
Keys are
integer
,
float
,
binary
,
q
or
qr
Values are subroutine references
Subroutine is passed three arguments
Original string representation of constant
How Perl wants to interpret the constant
(for
q
and
qr
) Describes how string is being used (
q
,
qq
,
tr
,
s
)
Install during
import
subroutine
[
Title Page
] [
TOC
] [
Prev
] [
Next
]
Page 29 of 31