develooper Front page | perl.perl5.porters | Postings from October 2011

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

Thread Previous
From:
Father Chrysostomos via RT
Date:
October 29, 2011 01:13
Subject:
[perl #96212] Swapping of $< and $> should be deprecated
Message ID:
rt-3.6.HEAD-31297-1319875975-1136.96212-15-0@perl.org
On Wed Aug 03 08:28:45 2011, LeonT wrote:
> 
> This is a bug report for perl from fawaka@gmail.com,
> generated with the help of perlbug 1.39 running under perl 5.14.1.
> 
> 
> -----------------------------------------------------------------
> 
> Perl has supported the idiom of swapping $< and $> (and likewise $(
>    and $)) since 5.0. However, there are some issues with this.
> 
>  * Most of al, it's useless. Unless you're running an early 90s BSD
>    (that lacks a saved UID), there's no reason whatsoever to use this
>    trick. You can just set $> to $< and then set it back to its
>    previous value.
>  * It needlessly makes UID management and list assignment/nextstate
>    more complicated (see also RT#96208).

Are you implying that the ability to swap $[<>] depends on the caching?

>  * It may lead to subtle issues on some platforms in matters that
>    depend on the real UID (such as signalling).


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About