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

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

Thread Previous
From:
Tels
Date:
April 27, 2007 10:19
Subject:
Re: Resend: Re: Invalid value for shared scalar? (threads?)
Message ID:
200704271923.48715@bloodgate.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Moin,

On Friday 27 April 2007 16:45:11 Dave Mitchell wrote:
> 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.

You mean I use Test::More, which uses Test::Builder, which uses threads, 
which erm whatever :-P

All the best,

Tels

- -- 
 Signed on Fri Apr 27 19:22:51 2007 with key 0x93B84C15.
 Get one of my photo posters: http://bloodgate.com/posters
 PGP key on http://bloodgate.com/tels.asc or per email.

 "What is fair use? Fair use is not a law. There's nothing in law. Right
 now, any professor can show a complete movie in his classroom without
 paying a dime - that's fair use. What is not fair use is making a copy
 of an encrypted DVD, because once you're able to break the encryption,
 you've undermined the encryption itself."

  -- Jack Valenti
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iQEVAwUBRjJNxHcLPEOTuEwVAQJ1/gf+OYDM+E7yUHzIWBPjyqREAGPeHK86bpiL
Foj9uF9ImzEEepEYdEKyuDQhNB/3g8NJmlCdbsucFRxKEUEMK8xgyenkZPJtQt3v
rkdTRnhQyChkzIBiFrQKtp1V8eRwW5ftMwnxiQSlQc91xvVSiuhrHfvYZm4Cnekr
vVcfm5hMMLJ7wkMgQw9829yUqCiJbZiZcqkKFMGhL3vXorvNyefiTLJ8tz9aoN+8
tPWB0G+gMl2g1E8XYhbE2yXL90pZ/S6zbkwZXnM10g6u/dzsDt54m4arJDKF09k0
wYKLNr3aEBQ+QImMECEFHC2KbPsHZ/4OAyLKc3iiJV1AA4ClfJWD9g==
=6E3b
-----END PGP SIGNATURE-----

Thread Previous


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