[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: local perl $_ variable is not portable
From: |
Stefano Lattarini |
Subject: |
Re: local perl $_ variable is not portable |
Date: |
Mon, 17 Jan 2011 22:47:04 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
Hi Ralf.
Just a small nit with the application of this patch ...
On Monday 17 January 2011, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Mon, Jan 17, 2011 at 01:39:29AM CET:
> > On Sunday 16 January 2011, Ralf Wildenhues wrote:
> > > foreach my $h (@list)
> > > {
> > > - my $_ = $h->{'option'};
>
> > > + $_ = $h->{'option'};
> > >
> > What about using a "good ol' local" here? E.g.:
> > local $_ = $h->{'option'};
> > That should be portable to any perl 5.x, and a bit safer.
>
> OK, good enough.
>
> > BTW, I'd also add to the ChangeLog entry the "git describe" output
> > for the commit where I messed things up (if I'm not mistaken, it
> > should be `v1.11-622-gf90a06c').
>
> Done, and committed right on top of that commit.
>
IMHO it would been better to merge the patch into the
'warns-win-over-strictness'
branch, and then merge it into 'master'. Having missed that, we should at least
merge the patch into 'warns-win-over-strictness', no?
Regards,
Stefano