# from John Peacock
# on Tuesday 21 April 2009 03:35:
>You aren't using version.pm comparisons in both cases, so it shouldn't
> be all that surprising that it doesn't work the way you'd expect it.
I think you need to treat it as a version.pm bug. The comparisons don't
match perl's.
$ perl -e 'BEGIN{package foo; $VERSION=v0.2.1_1; $INC{"foo.pm"}=1;}
use foo v0.2.20;'
foo v0.2.20 required--this is only v0.2.11 at -e line 1.
>When constructing the PV, the underscore is ignored (as in any bare
>number), but the PERL_MAGIC_vstring(V) has the original text as
>written.
Preserving the original text for later stringification is fine.
Treating the _ as a tuple delimiter is incorrect.
>If your code is comparing versions with version.pm, liberally sprinkle
>version->new() on at least one of your terms and you will always be
>safe.
If it doesn't give the same result as perl's module loading, this will
break somewhere.
--Eric
--
Don't worry about what anybody else is going to do. The best way to
predict the future is to invent it.
--Alan Kay
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------