andk / pause

Perl authors upload server
http://pause.perl.org/
150 stars 57 forks source link

Version comparison in packages_per_pmfile seems broken in some cases #448

Open charsbar opened 4 months ago

charsbar commented 4 months ago

The $version at the following line ( https://github.com/andk/pause/blob/b54e8bdfc7580ff77ee665357ce7f940c7974a86/lib/PAUSE/pmfile.pm#L299-L305 ) usually matches the version stored in $ppp->{$pkg}{version} , but sometimes the $version may be stringified "undef" which comes from the line https://github.com/andk/pause/blob/b54e8bdfc7580ff77ee665357ce7f940c7974a86/lib/PAUSE/pmfile.pm#L376 (via https://github.com/andk/pause/blob/b54e8bdfc7580ff77ee665357ce7f940c7974a86/lib/PAUSE/pmfile.pm#L128 and https://github.com/andk/pause/blob/b54e8bdfc7580ff77ee665357ce7f940c7974a86/lib/PAUSE/pmfile.pm#L199 ). It's probably better to add a helper function to compare versions that treats stringifiied undef as undef or 0.