Subject: | version compare does not work correct |
In CPAN::Site::Index
sub register($$$)
{ my ($package, $this_version, $dist) = @_;
# skip your code here
return if defined $registered_version
&& $registered_version > $this_version;
# skip your code here
}
if $registered_version is NOT a version object, than compare `'0.9.1' >
'0.10.0'` will give true (the case when regular string compare perl
operator get called not version object's one ). The rough path for this
is:
return if defined $registered_version
&& version->parse($registered_version) > $this_version;