in reply to Invalid value for shared scalar

Here you're adding a key and scalar value to an existing shared hash:

$self->{$tag} = shared_clone($value);

Whereas here, you are attempting to autovivify an anonymous hash containing that key/value pair and assign a reference to it as the value of the key "ALWD_INFO" in the shared hash:

$self->{ALWD_INFO}{$tag} = shared_clone($value);

That reference to an unshared anonymous hash is an invalid value for a shared scalar.

Simple fix:

sub set_alwd_info { my ($self, $tag, $value) = @_; my %temp : shared = ( $tag => $value ); lock($self); $self->{ALWD_INFO} = \%temp; }

Update: However, if the sub will be called multiple times, with different key/value pairs and you want them to accumulate, then you'll only want to vivify the nested shared hash once:

sub set_alwd_info { my ($self, $tag, $value) = @_; if( not exists $self->{ALWD_INFO} or ref( $self->{ALWD_INFO} ) ne +'HASH' ) { my %temp : shared = ( $tag => shared_clone($value) ); lock($self); $self->{ALWD_INFO} = \%temp; } else { $self->{ALWD_INFO}{$tag} = shared_clone($value); } }

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.