in reply to Shared hash within shared hash of hash???
threads::shared keeps all shared variables in a separate interpreter. If you declared hash like:
then hash and all its values will be stored in this dedicated interpreter. In case of:my %hash : shared = ();
you creating anonymous hash in the current interpreter and saving reference to it in the shared interpreter which is not allowed, that's why you should create a shared copy:$hash{foo} = {};
Another possibility:$hash{foo} = shared_clone({});
my %tmp : shared = (); $hash{foo} = \%tmp;
In Section
Seekers of Perl Wisdom