At 10:54 AM 10/26/99 +0200, Matthias Urlichs wrote: >Hi, > >Tuomas J. Lukka: >> >> Actually, I think that maybe >> $lock = lock $obj; >> undef $lock; >> would make a nice interface >> >That's somewhat nonintuitive, IMHO, because the current semantics of > > foo(); > >are identical to > > { my $bar = foo(); } >or > my $bar = foo(); > $bar = undef; > >so the lock code would need some internal magic to determine whether its >return value is going to be stored anywhere. > >Somehow I doubt that the current Perl core allows for this..? Oh, sure. Check wantarray. It's undef in void context (like a plain lock $foo) and false in scalar context. you can do it from within the core with a quick macro check, though I don't remember which one at the moment. Whether we want to do that or not is a separate question. Dan ----------------------------------------"it's like this"------------------- Dan Sugalski even samurai dan@sidhe.org have teddy bears and even teddy bears get drunk