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

Re: [rt.cpan.org #72505] Misuse of length(@array)

Thread Previous | Thread Next
From:
ikegami@adaelis.com via RT
Date:
March 25, 2012 09:35
Subject:
Re: [rt.cpan.org #72505] Misuse of length(@array)
Message ID:
rt-3.8.HEAD-10813-1332693308-1317.72505-6-0@rt.cpan.org
<URL: https://rt.cpan.org/Ticket/Display.html?id=72505 >

On Sun, Mar 25, 2012 at 10:40 AM, Gisle Aas <gisle@activestate.com> wrote:

> This was was perfectly fine code that I now had to change because of this
> warning.
>
> As you can see there are certainly valid uses of length(@array).  I would
> prefer for that warning to not be there.
>

There are certainly valid uses of numification of non-numeric strings,
stringification of undef, deep recursion, ambiguous use of operators,  etc,
but those warn too. The criteria isn't whether it has valid uses or not,
it's a question of how many time it's used, and for what percentage of
those times it's used incorrectly.

- Eric


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