thcsoft has asked for the wisdom of the Perl Monks concerning the following question:
snip...use threads; use threads::shared; use Thread::Queue;
snip...our (%sessions, %nicks, %times) : shared;
and from this line: $sessions{$session->{ID}} = $session; i get this warning: Invalid value for shared scalar at sbin/sessiond line 258. anobody got a clue, why?sub _save { my $session = $req->content; lock %times; lock %nicks; lock %sessions; $times{$session->{ID}} = time; $nicks{$session->{ID}} = $session->{PLAYER}->get('nickname') unless + $session->{PLAYER}->anonymus; $sessions{$session->{ID}} = $session; $logs->enqueue("save request: stored session $session->{ID}") if $d +ebug; $res->content({}); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Invalid value for shared scalar
by Forsaken (Friar) on Apr 29, 2005 at 07:42 UTC | |
by thcsoft (Monk) on Apr 30, 2005 at 00:36 UTC | |
|
Re: Invalid value for shared scalar
by davido (Cardinal) on Apr 29, 2005 at 07:09 UTC | |
by thcsoft (Monk) on Apr 30, 2005 at 04:09 UTC |