Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 53611
Status: open
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: david.tulloh [...] AirservicesAustralia.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Attribute insertion order goes weird on reinsertion
Date: Tue, 12 Jan 2010 10:40:21 +1100
To: <bug-Class-MOP [...] rt.cpan.org>
From: "Tulloh, David" <david.tulloh [...] AirservicesAustralia.com>
If you insert an already existing attribute it's insertion order becomes equal to the last object inserted. I would expect it to either retain the original number or increment. Attached is a small test script that demonstrates the bug.

Message body is not shown because sender requested not to inline it.

On Mon Jan 11 18:40:49 2010, david.tulloh@AirservicesAustralia.com wrote: Show quoted text
> If you insert an already existing attribute it's insertion order becomes > equal to the last object inserted. > > I would expect it to either retain the original number or increment. > > > Attached is a small test script that demonstrates the bug.
This has been warnocked for two years but better late than never I suppose. This seems like it should throw an error rather than be something allowed. What would re- adding an existing method *mean*? Methods aren't just hash keys, they (potentially) carry a lot of behavior along with them. So I think this should just throw an error rather than either of the options presented here. A patch is welcome! -Chris