in reply to Weird interaction of tie and overload

If I add

use overload '0+' => \# sub num { print "[$_[0]->[0]]"; return $_[0]->[0]; }

I get:

[1][1]1 == 1 1 != 3 1 != 4 [1][3]3 != 1 3 == 3 3 != 4 [1][4]4 != 1 4 != 3 4 == 4

In other words, it fails on each first pass of the inner loop. (In might also be failing on the first pass of the outer loop, but we can't tell.) I don't know what that means, though.

Replies are listed 'Best First'.
Re^2: Weird interaction of tie and overload
by rg0now (Chaplain) on Jul 27, 2005 at 07:27 UTC
    In other words, it fails on each first pass of the inner loop. (In might also be failing on the first pass of the outer loop, but we can't tell.) I don't know what that means, though.
    Dear ikegami! If you don't know the answer, how should I? Where should I go from here? Should I post this to p5p? Might this be a bug?
      Ha! Yeah, this has to be a bug. I don't know if it's related to overload's known bug or not. I have no idea what you should do. I don't know anything about p5p other than they exist.