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

Re: [PATCH 2 of 3] $] is deprecated - EXTERMINATE, EXTERMINATE, EXTERMINATE

Thread Previous | Thread Next
From:
Simon Cozens
Date:
August 25, 2001 04:26
Subject:
Re: [PATCH 2 of 3] $] is deprecated - EXTERMINATE, EXTERMINATE, EXTERMINATE
Message ID:
20010825121948.C511@netthink.co.uk
On Fri, Aug 24, 2001 at 04:25:44PM -0400, John Peacock wrote:
> This whole thread is completely missing the point.

Someone's missing the point, John, but I don't think it's me or Abigail.

Don't do this. It's stupid. It won't work. You're wasting your time on
this; do something that will work instead.

Firstly, "upgrade to a vstring" has no meaning. Nothing marks a string
as being "a vstring". I've said it before: a vstring is just a
collection of chr()'s (actually I said ord(), but not many people
noticed) stuck together. That's all.

If I have
    use foo v49.46.49; 
your code will see
    foo->VERSION("1.1");

"Oh", says your DWIMmer code, "that looks like a version. Better encode
it as a vstring". "Upgrading this to a vstring" gives you chr(1).chr(1)

chr(1).chr(1), suprisingly, isn't the same as chr(49).chr(46).chr(49),
and your code will *NOT* make a sensible comparison, and it won't make
the comparison I wanted. This "fix" will actually break things.

Leave it alone. Version comparison is not currently broken, so long as
people are consistent in what they're feeding to VERSION. You're not
going to be able to hack the code to make the people consistent, sadly.

Simon

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