note
gone2015
<p><b>Update:</b> spoke too soon, sorry -- I'd left out the <c>use threads</c>.</p>
<p>With <c>use threads</c> in I get the same as you. I notice the caveat in [cpan:/threads::shared] re <c>refaddr()</c> -- I guess that applies to stringification too. So, it seems to be a documented problem. <c>is_shared()</c> is recommended in place of <c>refaddr</c>, but I don't know how that helps you with <c>XML::Dumper</c> -- sorry.</p>
<strike>
<p>FWIW: I just tried your code and got 11 different addresses -- I have perl 5.10.0 with threads::shared version 1.14 (32 bit Win32) and 1.27 (64 bit Linux).</p>
<p>In the past I have found <c>shared()</c> to be less than useful. You could try:<code>
for (0..10) {
my %sh : shared ;
$h{$_}=\%sh ;
}
</code>and see if it works any better for you.</p>
</strike>
737125
737125