Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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

by ikegami (Pope)
on Sep 07, 2012 at 00:06 UTC ( #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.


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?

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2015-11-30 11:41 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (769 votes), past polls