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 05:43
Subject:
Re: Resend: Re: Invalid value for shared scalar? (threads?)
Message ID:
20070427124245.GA19333@iabyn.com
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;
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.


-- 
print+qq&$}$"$/$s$,$*${d}$g$s$@$.$q$,$:$.$q$^$,$@$*$~$;$.$q$m&if+map{m,^\d{0\,},,${$::{$'}}=chr($"+=$&||1)}q&10m22,42}6:17*2~2.3@3;^2dg3q/s"&=~m*\d\*.*g

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