So, what do you think the following code does?
package Bar;
use overload '""' => sub { "Bar" };
package main;
$a = $b = {};
bless $b, 'Bar';
print $a, "\n";
print $b, "\n";
It's not
Bar
Bar
which is what I would expect.
Instead we get:
Bar=HASH(...)
Bar
Which isn't exactly great. This is a problem on (at least) perl 5.8.0rc1, 5.6.1 and 5.6.0.
I think this is the same problem as I tripped over when I was working on reblessing objects in Pixie from a class which did have overloads to one which didn't.
stab in the dark (Score:1)
Does it have anything to do with $a and $b being special?
Do you get the same with $aa and $bb which aren't the
special vars set aside for sort()?
-matt
Re:stab in the dark (Score:1)
Which means ugly workaround time at castle pixie. Or something.