develooper Front page | perl.perl6.language.flow | Postings from September 2000

Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go

From:
Tom Christiansen
Date:
September 2, 2000 19:17
Subject:
Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go
Message ID:
23036.967947414@chthon
>I don't want that to change. I simply want that return (I'm not sure
>how to phrase this) be able to return only a scalar or an aggregate.

die unless wantarray;

>It should be immune from having a scalar context pushed through from
>the caller and change the commas from a list seperator into the comma
>operator.

Ok, how are you going to jam a list into a place that only
holds a single thing?  Modulo some superpositional silliness,
you aren't.  You need a rule for what to do.  We have a rule
for that, but you don't like it.  It's not sensible that this
rule be applied inconsistently.  

--tom



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