perlquestion
Nitrox
I'm trying to access a blessed reference to a tied hash from a child thread and I'm going nuts in the process. Could someone shed some light on how to accomplish this?
<p>
At the point the "object" is created by the parent <code>print $HS</code> returns:
<p>
Win32::OLE=HASH(0x296b448)
<p>
and <code>print Dumper(\$HS)</code> returns:
<code>
$VAR1 = \bless( {
'plugin' => undef,
'ThreadID' => 1124,
'NoLog' => 0,
'hwnd' => 1900794,
'DebugMode' => 0,
'EventCount' => 2,
'DeviceCount' => 2,
'LastCommandSelected' => undef,
'SunRise' => '7:02 AM',
'SunSet' => '4:13 PM'
}, 'Win32::OLE' );
</code>
So all is good up to this point. The parent then spawns a child and the same code run in the child thread produces:
<p>
Win32::OLE=HASH(0x437c94c)
<p>
Calling <code>Dumper(\$HS)</code> in the child crashes the application without any output to stderr/out. Even trying <code>print $HS->{SunSet}</code> causes the same crash.
<p>
This is all I want for Christmas.
<p>
-Nitrox