At 11:42 AM 7/24/02 +0200, Arthur Bergman wrote: >>Ok with me, I'm interested in functionality only... and some way to be >>able to explain it to people... ;-) So the list would be: >> unshared current state if not shared: copied when cloning >> shared accessible to all threads, not copied >> unique only accessible in thread, not copied >no, unique is already used, it makes it readonly between all threads
Argh... _completely_ missed that... Does it also work with "my" ? perl -e 'my $var : unique' doesn't generate an error, so I guess it does. Too bad it is only documented in perlfunc/our... >why do we need three states >my $foo; #depends on global sharedness >my $foo : shared; #always shared >my $foo : unshared; # never shared > >my $foo : unique; #shared readonly between all threads I guess the "unshared" does what I meant with "private". I guess any attempt to change it after being cloned will bomb? Liz
