I couldn't find any mentioning of arrays getting reset when share() is called
on them. Do I miss something obvious?
test
----
use strict;
use warnings;
use threads;
use threads::shared;
my @obj = ();
$obj[0] = 5;
print "$obj[0]\n";
share (@obj);
print "$obj[0]\n";
---
% perl-blead-ithreads test
5
Use of uninitialized value in concatenation (.) or string at test line 11.
If I initialize the data after sharing an empty array it works fine. Also:
my @obj : shared = (5);
print "$obj[0]\n";
does the right thing, but I haven't digged into the code to see whether
initialization happens before the sharing.
Is it a bug, an unclear documentation, or a stupid user? ;)
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
- Re: array losing its data when share() is called Stas Bekman
- Re: array losing its data when share() is called Stas Bekman
