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

[perl #113064] Add for()/when() syntax in official Perl docs

Thread Next
From:
Father Chrysostomos via RT
Date:
September 19, 2012 22:15
Subject:
[perl #113064] Add for()/when() syntax in official Perl docs
Message ID:
rt-3.6.HEAD-11172-1348118119-784.113064-15-0@perl.org
On Wed May 23 15:51:31 2012, Perl@ResonatorSoft.org wrote:
> 
> This is a bug report for perl from Perl@ResonatorSoft.org,
> generated with the help of perlbug 1.39 running under perl 5.10.1.
> 
> -----------------------------------------------------------------
> From IRC:
> 
> Original topic: http://www.effectiveperlprogramming.com/blog/1333
> 
> Should we put this into the official Perl docs?  Otherwise, I
> imagine the lifecycle of a programmer's use of given/when will be
> this:
> 
> 1. "Hey, this is great!  Finally, a switch/case type syntax."
> 2. "WTF?  My any { $_ stuff } doesn't work as expected."
> 3. "Wait, this is SUPPOSED to work like this?"
> 4. "Okay, I'm swearing off given/when."
> 5. "Oh wait, so you can actually still use it without all of the
>     $_ problems?  Why isn't this in the Perl docs to begin with?"
> 
> With various programmers in various states of 1 thru 5.

In bleadperl, given now aliases $_ exactly the way for does.  So I think
we can consider this resolved.

Please holler if you disagree.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=113064

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