develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [PATCH 1 of 3] $] is deprecated - eliminate from core tests

Thread Previous | Thread Next
From:
John Peacock
Date:
August 20, 2001 18:58
Subject:
Re: [PATCH 1 of 3] $] is deprecated - eliminate from core tests
Message ID:
3B81C019.9A681F2F@rowman.com
Michael G Schwern wrote:
> 
> On Mon, Aug 20, 2001 at 09:38:47PM -0400, John Peacock wrote:
> > Whilst digging around, I discovered a few $] uses that curled my hair.
> > Since it is deprecated, attached is a patch to eliminate its use,
> > while testing the same things.
> 
> Instead of eliminating the old tests, keep them around.  Even
> deprecated things have to work.
> 

Yes, but the test doesn't even do what it purports to do.  Look at 
the patch:

-eval sprintf "use %.5f;", $] - 0.000001;

This would seem to be trying to get a version just slightly older
than the current one.  Problem is that $] == 5.007002 (in numeric
context), which is 6 decimal places not 5.  These tests are not 
testing whether $] has a reasonable value; rather they are testing
whether "use" works for small delta's around the current Perl version.

If it was actually trying to test whether 

	$] eq sprintf("%vd",$^V)

or something, I can see it.  But here, $] is just being used (badly)
to generate some test data.

QED

John Peacock

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