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

Re: [perl #67694] List::Util attaching to the wrong $_ when used inside given/when construct

Thread Previous | Thread Next
From:
Eric Brine
Date:
July 24, 2009 15:45
Subject:
Re: [perl #67694] List::Util attaching to the wrong $_ when used inside given/when construct
Message ID:
f86994700907241544k3e592c63r9a022ab3e6f6ad8d@mail.gmail.com
On Fri, Jul 24, 2009 at 4:42 PM, Rafael Garcia-Suarez <
rgarciasuarez@gmail.com> wrote:

> 2009/7/24 Dave Mitchell wrote:
> > So if I've understood this correctly, given() adds a lexical $_ to the
> > scope, and there's a bug in List::Util::first in that it doesn't work
> with
> > a lexical $_? So not a bug in given/smartmatch?
>
> Yes, although I'm not 100% sure that pp_given does exactly the right
> thing with the pad. List::Util::first needs to assign to the lexical $_
> in the pad if there is one.
>

How are the Pure Perl implementation of List::Util and countless other Perl
(&) subs suppose to do that?

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