in reply to Re^2: Annoying threads share problem!
in thread Annoying threads share problem!

Perhaps you'd comment on the disparity between that and this?

use threads; use threads::shared;; my $x:shared = bless [], 'X'; Invalid value for shared scalar at (eval 4) line 1, <STDIN> line 2.

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

Replies are listed 'Best First'.
Re^4: Annoying threads share problem!
by dave_the_m (Monsignor) on Oct 09, 2005 at 13:08 UTC
    Invalid value for shared scalar at (eval 4)
    You can only assign shared values to a shared variable. This works:
    my $obj = bless [], 'X'; share $obj; my $x:shared = $obj;

    Dave.