develooper Front page | perl.perl5.porters | Postings from April 2007

Re: Resend: Re: Invalid value for shared scalar? (threads?)

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
April 27, 2007 09:45
Subject:
Re: Resend: Re: Invalid value for shared scalar? (threads?)
Message ID:
20070427164511.GD19333@iabyn.com
On Fri, Apr 27, 2007 at 04:38:43PM +0000, Tels wrote:
> > Well, usually means that someone has tried to assign to a shared var, a
> > value that is itself neither a simple scalar value, nor a shared value;
> > eg:
> >
> >     use threads;
> >     use threads::shared;
> >
> >     my $s : shared;
> >     my %h : shared;
> >
> >     $s = "foo";	# ok
> >     $s = \%h;	# ok
> >     $s = {};	# error
> >
> > As to why it's occurring in your case, I don't know - quite possibly a
> > bug in Test::Builder or Threads::Shared, which presumably has been fixed
> > by 5.8.8.
> 
> Thanx for the info. The problem I have with the failure is that my 
> testscript doesn't even use threads, nor does the rest of my code....

You're using Test::Builder, which uses shared vars, presumably to be
threadsafe.

-- 
A walk of a thousand miles begins with a single step...
then continues for another 1,999,999 or so.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About