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

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

Thread Previous | Thread Next
Dave Mitchell
April 27, 2007 05:43
Re: Resend: Re: Invalid value for shared scalar? (threads?)
Message ID:
On Fri, Apr 27, 2007 at 02:09:02PM +0000, Tels wrote:
> > 	t/biglog............ok 1/66Invalid value for shared scalar

> does anybody have an insight into what this error means and why it could be 
> occuring?

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;

    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


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About