perl-carton / carton

Bundler or pip freeze for Perl
http://search.cpan.org/dist/carton
Other
494 stars 96 forks source link

Parsing module version of Getopt::Long 2.55 #288

Closed robrwo closed 10 months ago

robrwo commented 10 months ago

Getopt::Long 2.55 adds a new module to the distribution, that defines the version like so

use Getopt::Long (); our $VERSION = $Getopt::Long::VERSION;

The problem is that Carton uses a different version of Getopt::Long (loaded as a prereq of Carton) so it sets the version incorrectly in cpanfile.snapshot:

-  Getopt-Long-2.54
-    pathname: J/JV/JV/Getopt-Long-2.54.tar.gz
+  Getopt-Long-2.55
+    pathname: J/JV/JV/Getopt-Long-2.55.tar.gz
     provides:
-      Getopt::Long 2.54
-      Getopt::Long::CallBack 2.54
-      Getopt::Long::Parser 2.54
+      Getopt::Long 2.55
+      Getopt::Long::CallBack 2.55
+      Getopt::Long::Parser 2.52

I image this issue will affect any prerequisite of Carton that is being changed in the local library.

Note that I've reported this as an issue with Getopt::Long, since it makes it difficult to determine the version by tools that have a different version of it loaded in memory.

miyagawa commented 10 months ago

PAUSE failed to parse the version as well so that module is not indexed with the correct distribution either.

➜  curl -s http://www.cpan.org/modules/02packages.details.txt.gz | gzcat | grep Getopt-Long-2 
Getopt::Long                       2.55  J/JV/JV/Getopt-Long-2.55.tar.gz
Getopt::Long::CallBack             2.55  J/JV/JV/Getopt-Long-2.55.tar.gz
Getopt::Long::Parser               2.54  J/JV/JV/Getopt-Long-2.54.tar.gz

This should be fixed in the distribution.