Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 44562
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.84
Fixed in: (no value)



Subject: ::Module->package_is_perl_code : problem comparing version strings
CPANPLUS::Module->package_is_perl_code() uses operators '>' and '>=' to compare version strings. This is not reliable as it has problems with version number containing underscores or worse. Use version.pm instead: #return if $self->version > $self->installed_version; my $v = version->new($self->version); return if $v gt version->new($self->installed_version); ### if the package is newer or equal to the corelist, ### then it's dual-lifed #return if $self->version >= $core; return if $v ge version->new($core);
On Wed Mar 25 11:31:17 2009, DOLMEN wrote: Show quoted text
> CPANPLUS::Module->package_is_perl_code() uses operators '>' and '>=' to > compare version strings. > This is not reliable as it has problems with version number containing > underscores or worse. > > Use version.pm instead: > > #return if $self->version > $self->installed_version; > my $v = version->new($self->version); > return if $v gt version->new($self->installed_version); > > ### if the package is newer or equal to the corelist, > ### then it's dual-lifed > #return if $self->version >= $core; > return if $v ge version->new($core);
Thanks, good catch! Now resolved in dev. Cheers,