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

Re: [perl #96212] Swapping of $< and $> should be deprecated

Thread Previous | Thread Next
From:
Jesse Luehrs
Date:
July 3, 2012 10:36
Subject:
Re: [perl #96212] Swapping of $< and $> should be deprecated
Message ID:
20120703173640.GM30375@tozt.net
On Tue, Jul 03, 2012 at 07:26:38PM +0200, Leon Timmermans wrote:
> On Tue, Jul 3, 2012 at 7:15 PM, Jesse Luehrs via RT
> <perlbug-followup@perl.org> wrote:
> > Pushed to doy/deprecate_uid_gid_swap. Didn't merge yet because the test
> > isn't really very accurate, it just checks for any of $<, $>, $(, or $)
> > being used on both the right and left side of a list assignment, but
> > would anyone be doing that outside of this context? Detecting an actual
> > swap would be pretty complicated.
> 
> Actually, it's easily and reliably detectable in runtime, pp_aasign
> may be a better place to issue the warning, though maybe we'd want to
> make sure it doesn't keep giving that warning.

It's not any more detectable at runtime than at compile time - as far as
I can tell, the code in newASSIGNOP that handles the delayed assignment
does so any time any of those variables appear on the lhs of a list
assignment. I could be wrong of course.

-doy

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