Closed p5pRT closed 20 years ago
perl -MEnglish -e 'print $PERL_VERSION';
prints "??????" :-( It used to print "5.00503" in 5.005_03.
At 15:16 +0100 2000-03-01\, Johan Vromans wrote:
perl \-MEnglish \-e 'print $PERL\_VERSION';
prints " û" :-( It used to print "5.00503" in 5.005_03.
perldelta.pod says
The English module now sets $PERL_VERSION to $^V (a string value) rather than C\<$]> (a numeric value). (This is a potential incompatibility. Send us a report via perlbug if you are affected by this.)
I guess you've done that. How big a problem is this incompatibility for you? -- Dominic Dunlop
On Wed\, 01 Mar 2000\, Dominic Dunlop wrote:
At 15:16 +0100 2000-03-01\, Johan Vromans wrote:
perl \-MEnglish \-e 'print $PERL\_VERSION';
prints " û" :-( It used to print "5.00503" in 5.005_03.
perldelta.pod says
The English module now sets $PERL_VERSION to $^V (a string value) rather than C\<$]> (a numeric value). (This is a potential incompatibility. Send us a report via perlbug if you are affected by this.)
I guess you've done that. How big a problem is this incompatibility for you?
I don't know about Johan\, but I think it's a bug. What about software that just prints it out (which is pretty much what this variable is there for). You'll break every piece of software that uses this variable.
--
\
Details: FastNet Software Ltd - XML\, Perl\, Databases. Tagline: High Performance Web Solutions Web Sites: http://come.to/fastnet http://sergeant.org Available for Consultancy\, Contracts and Training.
Dominic Dunlop \domo@​computer\.org wrote
perldelta.pod says
The English module now sets $PERL_VERSION to $^V (a string value) rather than C\<$]> (a numeric value). (This is a potential incompatibility. Send us a report via perlbug if you are affected by this.)
I guess you've done that. How big a problem is this incompatibility for you?
It may be that 'print $PERL_VERSION' now prints something different\, but it should still look like a version number. I wasn't aware that Perl version numbers had been translated into German.
So it's a clear bug\, incompatibility or not.
Mike Guy
On Thu\, 02 Mar 2000 00:07:26 GMT\, "M.J.T. Guy" wrote:
Dominic Dunlop \domo@​computer\.org wrote
perldelta.pod says
The English module now sets $PERL_VERSION to $^V (a string value) rather than C\<$]> (a numeric value). (This is a potential incompatibility. Send us a report via perlbug if you are affected by this.)
I guess you've done that. How big a problem is this incompatibility for you ?
It may be that 'print $PERL_VERSION' now prints something different\, but it should still look like a version number. I wasn't aware that Perl version numbers had been translated into German.
So it's a clear bug\, incompatibility or not.
It was a conscious choice\, suggested by Larry. I guess we need to think about how big a breakage this is.
Note that it'll still *compare* correctly when you use numeric comparisons\, so it is mostly only a cosmetic/display issue.
We can change it back if you come up with as compelling a name as $PERL_VERSION for it. :-)
Sarathy gsar@ActiveState.com
On Wed\, 1 Mar 2000\, Johan Vromans wrote:
perl \-MEnglish \-e 'print $PERL\_VERSION';
prints "ÃÂ" :-( It used to print "5.00503" in 5.005_03.
I'm sure you know that perl -MEnglish -e 'printf "%vd\n"\, $PERL_VERSION'; print "5.5.670"
is there a way to tag strings that we want printed using a "%vd" format with some magic that would make this work again?
Maybe if they were some sort of object???
what about cmp\, and assignments???
If there is a way\, users would invent reasons to want to specify the format and the value for the "*"'ed value that sprintf uses\, .... oh well...
On Wed\, Mar 01\, 2000 at 04:55:56PM -0800\, Gurusamy Sarathy wrote:
Note that it'll still *compare* correctly when you use numeric comparisons\, so it is mostly only a cosmetic/display issue.
I think it is becoming very confusing. $] is a number\, and should be compared numerically\, e.g.
print "Yes\n" if $] > 5.005_03;
$^V is a string\, and should be compared as a string with a string\, e.g.
print "Yes\n" if $^V gt 5.5.3;
This works:
print "Yes\n" if $^V > 5.005_03;
But this gives a warning:
print "Yes\n" if $^V > 5.5.30;
And this fails without warning:
print "Yes\n" if $^V gt 5.005_03;
We can change it back if you come up with as compelling a name as $PERL_VERSION for it. :-)
May I suggest $PERLVERSION\, and to remove its dual nature and other magic?
-- Johan
Gurusamy Sarathy wrote:
On Thu\, 02 Mar 2000 00:07:26 GMT\, "M.J.T. Guy" wrote:
It may be that 'print $PERL_VERSION' now prints something different\, but it should still look like a version number. I wasn't aware that Perl version numbers had been translated into German.
So it's a clear bug\, incompatibility or not.
It was a conscious choice\, suggested by Larry. I guess we need to think about how big a breakage this is.
Note that it'll still *compare* correctly when you use numeric comparisons\, so it is mostly only a cosmetic/display issue.
We can change it back if you come up with as compelling a name as $PERL_VERSION for it. :-)
How about $PERL_VERSION_STRING\, assuming that $PERL_VERSION gets aliased back to $] ?
-- Peter Haworth pmh@edison.ioppublishing.com "I was claiming to be Satan\, and explaining some of my actions. This should give you a slight clue that I may not be presenting a researched thesis." -- Paul David Jones
Note to Larry: This is about $PERL_VERSION becoming $^V instead of $].
On Thu\, 02 Mar 2000 10:59:19 +0100\, Johan Vromans wrote:
On Wed\, Mar 01\, 2000 at 04:55:56PM -0800\, Gurusamy Sarathy wrote:
Note that it'll still *compare* correctly when you use numeric comparisons\, so it is mostly only a cosmetic/display issue.
I think it is becoming very confusing.
You probably only think so because you're not ignoring the fact that $^V has a numeric value (as you should :) for compatibility.
$] is a number\, and should be compared numerically\, e.g.
print "Yes\n" if $] > 5.005_03;
As it has always been.
$^V is a string\, and should be compared as a string with a string\, e.g.
print "Yes\n" if $^V gt 5.5.3;
As documented.
This works:
print "Yes\n" if $^V > 5.005_03;
Because $^V is now $PERL_VERSION\, and this provides compatibility and a certain amount of DWIMness.
But this gives a warning:
print "Yes\n" if $^V > 5.5.30;
Of course\, because you're not expected to do that (see perlvar.pod).
And this fails without warning:
print "Yes\n" if $^V gt 5.005_03;
Ditto\, and I'm not sure what to do about. It is the same class of problem as the user doing:
$anyoldstring gt 1.234_567
We can change it back if you come up with as compelling a name as $PERL_VERSION for it. :-)
May I suggest $PERLVERSION\, and to remove its dual nature and other magic?
Aside from the dual value\, there is no other magic. And I don't think you've shown that the dual value actually hurts.
I guess we can make it $PERL_VERSION_STRING again and let sleeping dogs lie\, but I'm going to let Larry rule on it\, because he may have written $PERL_VERSION as being $^V in camel3-2b around the time he suggested doing that.
Sarathy gsar@ActiveState.com
Johan Vromans writes:
May I suggest $PERLVERSION\, and to remove its dual nature and other magic?
And I would suggest removing v12.34 altogether.
[I do not object to qv(12.34) or qq(\v12.34).]
Ilya
Gurusamy Sarathy writes: : I guess we can make it $PERL_VERSION_STRING again and let sleeping dogs lie\, : but I'm going to let Larry rule on it...
I'd like to leave $^V as $PERL_VERSION. Putting a square peg into a round hole can be worthwhile if you don't mind a few shavings.
Larry
Migrated from rt.perl.org#2237 (status was 'resolved')
Searchable as RT2237$