|Pathologically Eclectic Rubbish Lister|
Re: share() bug? ( [perl #30702] )by liz (Monsignor)
|on Jul 15, 2004 at 20:40 UTC||Need Help??|
It's not a bug. It's a side effect of using tie() for shared arrays and hashes.
Shared arrays, as shared hashes, are implemented using tie(), as can be observed from the output of the tied() function.
And losing / hiding the original value of something, is a known side-effect of tie(), as far as I know.
So there's no easy solution, I'm afraid. Fixing tie() to keep the original value, may be in order, but may also break a lot of programs.
Fixing threads.pm and threads::shared to not use tie() would be best, but not something we're going to see in the 5.8 life cycle of Perl.
I think that's basically the dilemma.