| | But using &share to bypass prototype checking is evil, as share is | intended to be used on variables only. |
It still crashes even when I get rid of share() and try to declare everything in the variable declarations. For example, the following still crashes: ---- #!/usr/bin/perl # # BUG: foreach crashes on shared hashref # use threads; use threads::shared; my @list : shared; my %a : shared; my $a : shared; $a = \%a; bless($a); push(@list, $a); foreach $a (@list) { $a->{n}; # <-- needed to produce segmentation fault print "$a\n"; # <-- segmentation fault } ---- Is there no way, then, to have a shared list of references? Am I simply missing something in my syntax? Scott