On Tue, 1 Aug 2006, Eric Wilhelm wrote:
# from David Golden
# on Tuesday 01 August 2006 09:03 am:
I'd strongly suggest the former, since META.yml may be parsed by
things that don't necessarily understand version objects and the "v"
will make them numify as zero. E.g.:
$ perl -e "$v = q{v2.61.129}; print 0+$v"
0
It's not correct without the v either, but at least you get warnings in
either case.
$ perl -we '$v = q{2.61.129}; print 0+$v'
Argument "2.61.129" isn't numeric in addition (+) at -e line 1.
2.61
Isn't the numeric form "2.610129" ? If you're really concerned about
non version-enabled code, seems like that would be the way to do it.
Not quite. The numeric form that version.pm is documented to put out
is 2.061129 in that case. (to make 2.100.xxx > 2.99.xxx)
But in my opinion, comparing on version.pm->numify would still be the best
idea, I think.
--Curtis
--
Curtis Jewell
[EMAIL PROTECTED]
%DCL-E-MEM-BAD, bad memory
-VMS-F-PDGERS, pudding between the ears
[I use PC-Pine, which deliberately does not display colors and pictures
in HTML mail]