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

Re: bug or not? constants warn only once

Thread Previous | Thread Next
From:
David Nicol
Date:
April 24, 2008 10:58
Subject:
Re: bug or not? constants warn only once
Message ID:
934f64a20804241057g5c3b75j6febbeccb2617cc9@mail.gmail.com
I think it does the right thing now and if directed to the relevant
paragraph of perldoc I will attempt to submit a modification it
making clear something to the effect that "Once a string has been
evaluated as a number, it is considered to be numeric, for warning
purposes, until it is loaded with a new string, at which time conversion
to a number will be deferred until again needed."

go PMAW!

On Thu, Apr 24, 2008 at 12:50 PM, Jan Dubois <jand@activestate.com> wrote:

> On Thu, 24 Apr 2008, Nicholas Clark wrote:
>  > On Thu, Apr 24, 2008 at 07:23:50PM +0200, H.Merijn Brand wrote:
>  >
>  > > > The implementation caches the numeric result, and uses that next time round,
>  > > > before it gets a chance to warn. It's been this way since (at least) 5.005_03
>  > > > (which is the oldest perl I have hanging around)
>  > > >
>  > > > So is this a bug? Advice from Klortho #11943 suggests not:
>  > >
>  > > Not a bug.
>
>  So you could say you should never cache if the conversion
>  could have generated a warning.
>
>  Cheers,
>  -Jan

that idea is so tail-wagging-the-dog.

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