Hello all.
I am in the process of migrating a very messy code, partially working. In my work (I have done virtually no threaded work before) I came across a code that assigns a reference to a shared hash to a value in another shared hash. I added cluck to get the address info, and The value assigned is different than the value stored, if I read the output correctly Code is:
my %all_shary_for_subs :shared;
my %sim_info :shared; $all_shary_for_subs{'%si
+m_info'}=\%sim_info;
cluck("the sim_info glob ref is:" . \%sim_info . "\n" );
cluck("And in the hash it is:" . $all_shary_for_subs{'%sim_info'} . "\
+n" ) ;
The output of the code is the following (everything else is just use Carp, threads, threads::shared and comments)
the sim_info glob ref is:HASH(0x241bea8)
at /edata/eng/ldagan/voodoo_from_1.1.7.b4/DesignLibs/ScriptLib/Generic/WMPerl/voodoo/voodoo_beta.pl line 81
And in the hash it is:HASH(0x2e42990)
at /edata/eng/ldagan/voodoo_from_1.1.7.b4/DesignLibs/ScriptLib/Generic/WMPerl/voodoo/voodoo_beta.pl line 82
Why are the two addresses different?