- or download this
my $var :shared;
$var = 1; # ok
$var = []; # error
$var = &share([]); # ok
- or download this
my %hash :shared = ( ... );
$DataQueue->enqueue(\%hash);
- or download this
# Fixed as per BrowserUK's reply.
# Initialization must be done after share.
my $href = share({});
%$href = ( ... );
$DataQueue->enqueue($href);
- or download this
use Storable qw( freeze thaw );
my %hash = ( ... );
$DataQueue->enqueue(freeze(\%hash));