develooper Front page | perl.perl5.porters | Postings from April 2008

Re: bug or not? constants warn only once

Thread Previous | Thread Next
From:
Vincent Pit
Date:
April 24, 2008 10:57
Subject:
Re: bug or not? constants warn only once
Message ID:
4810C9DA.4010309@profvince.com

> $ perl -lwe 'sub pie {print 0 + "pie"}; pie; pie;'
> Argument "pie" isn't numeric in addition (+) at -e line 1.
> 0
> 0
>
> So is this a bug? Advice from Klortho #11943 suggests not:
>
>   #11943 Ah yes, and you are the first person to have noticed this bug since 1987.  Sure.
>
> but is it right, or am I?
>
> Nicholas Clark
>   

While generating a warning at each run is more correct, it doesn't 
really give the user more useful information about the problem. On the 
contrary, correcting this would generate a lot of similar warnings at 
the expense of more checks. I'd be for just letting the things in this 
state.

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