develooper Front page | perl.perl5.porters | Postings from September 2012

Re: given/when/~~ "final" thoughts (ha ha ha)

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
September 26, 2012 15:29
Subject:
Re: given/when/~~ "final" thoughts (ha ha ha)
Message ID:
20120926222926.GA2693@fernweh.plasmasturm.org
* Father Chrysostomos <sprout@cpan.org> [2012-09-17 02:15]:
> Making it work wouldn’t be hard. That would also make lexicals
> visible, as in when{my $x}{$x}. I can’t say I’m very fond of the idea.
> But I am not opposed to it per se.

I think it has to work, actually:

    if   ( my $x = foo $bar ) { do_something_with $x }
    when { my $x = foo $bar } { do_something_with $x }

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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