Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Your mistake is here use overload '+' => \&add_latency, add_latency is not written to cooperate with overload As overload examples my ($self, $other, $swap) = @_; To explain, + is a binop, binary operator, it takes two arguments ... this arglist is slightly clearer my( $self_operand_overloaded, $other_operand, $other_operand_was_on_the_left_side ) = @_; $other_operand can be undef $other_operand_was_on_the_left_side is a boolean, not an object overload explains in detail In reply to Re: Overloaded operator ends up with three arguments. (as documented)
by Anonymous Monk
|
|