develooper Front page | perl.perl5.porters | Postings from May 2009

Re: feature 'switch' as an expression?

Thread Previous | Thread Next
From:
Vincent Pit
Date:
May 8, 2009 11:27
Subject:
Re: feature 'switch' as an expression?
Message ID:
4A047985.5030005@profvince.com

> On Fri, May 8, 2009 at 1:19 PM, Eric Brine <ikegami@adaelis.com> wrote:
>
>   
>> "if" and "unless" currently return the value of the last expr of the clause
>> that was executed, or the result of the conditional if no clauses were
>> executed. Is that the desired behaviour? It may not need changing.
>>
>>     
>
> There was discussion about optimizing "if (!cond)" and "unless (!cond)".
> This may already have had an effect on the return value.
>   
I already introduced this optimization in blead, but I made sure it only
applies when the test happens in void context.

Vincent.

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