Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: $x | $y | $z = $z | ($x | $y) ?

by ikegami (Patriarch)
on Sep 07, 2012 at 00:06 UTC ( [id://992212]=note: print w/replies, xml ) Need Help??


in reply to $x | $y | $z = $z | ($x | $y) ?

Overloaded operator handlers sometimes receive operands in reversed order, but Perl will notify the handler when it does so by setting the swapped argument to true.

overload:

Three arguments are passed to all subroutines specified in the use overload directive (with one exception - see nomethod). [...] The third argument is set to TRUE if (and only if) the two operands have been swapped. Perl may do this to ensure that the first argument ($self ) is an object implementing the overloaded operation, in line with general object calling conventions. [...]

You probably disregarded that argument?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://992212]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-03-19 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found