Subject: | CPAN fails to read version from some modules during r command |
I verified that ExtUtils::MakeMaker is running OK:
/opt/perl_5.8.8/bin/perl -Mversion -MExtUtils::MakeMaker -e 'print
ExtUtils::MakeMaker->new->parse_version
("/opt/perl_5.8.8/lib/Module/ExtractUse.pm")'
Warning: Guessing NAME [Perl] from current directory name.
0.20
(0.20 is the version of the installed Module::ExtractUse)
But when I am running in the CPAN shell the 'r' command, it chokes on
this line from /opt/perl_5.8.8/lib/Module/ExtractUse.pm:
use version; our $VERSION=version->new('0.20');
The complete error message is (I copy/pasted two lines of context of
the output of the 'r' command):
Module::CPANTS::Analyse undef 0.75 DOMM/Module-CPANTS-
Analyse-0.75.tar.gz
Could not eval '
package ExtUtils::MakeMaker::_version;
no strict;
BEGIN { eval {
require version;
"version"->import;
} }
local $VERSION;
$VERSION=undef; do {
use version; our $VERSION=version->new('0.21');
}; $VERSION
' in /opt/perl_5.8.8/lib/Module/ExtractUse.pm: Can't call
method "new" on an undefined value at (eval 1311)
line 11, <FH> line 10.
Could not eval '
package ExtUtils::MakeMaker::_version;
no strict;
BEGIN { eval {
require version;
"version"->import;
} }
local $VERSION;
$VERSION=undef; do {
use version; our $VERSION=version->new('0.21');
}; $VERSION
' in /opt/perl_5.8.8/lib/Module/ExtractUse.pm: Can't call
method "new" on an undefined value at (eval 1312)
line 11, <FH> line 10.
Module::ExtractUse undef 0.21 DOMM/Module-ExtractUse-
0.21.tar.gz
It seems strange that the ExtUtils::MakeMaker::MM_Unix->parse_version
method is called twice, and cannot interpret the code. Does CPAN do
any tweaking of the 'version' name?
This happens here on my perl-5.8.8, both on Solaris 8 (Sparc) and
RedHat Enterprise Linux 3.0 (x86).
Please let me know if you need any additional information.
Cheers,
Marek