Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: oxdeadbeef [...] pit-of-despair.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.84
  • 0.85_02
  • 0.85_03
  • 0.85_04
  • 0.85_05
Fixed in: (no value)



Subject: _split_package_string does not parse bad package formats
CPANPLUS::Internals::Utils::_split_package_string has a parsing problem with some malformed packages. The following package are examples of malformed package names id/A/AU/AUSCHUTZ/IO-Stty-.01.tar.gz id/A/AU/AUSCHUTZ/IO-Stty-.02.tar.gz id/D/DK/DKYGER/Parse-Nessus-ENX-.01.tar.gz id/D/DK/DKYGER/Parse-Nessus-NBE-.01.tar.gz id/D/DU/DURIST/Drupal-Admin-.01.tar.gz id/S/SA/SAXJAZMAN/database/Database-Schema-Config-.01.tar.gz id/S/SA/SAXJAZMAN/database/Database-Schema-Config-.02.tar.gz perl -MData::Dumper -MCPANPLUS::Backend -le 'my $cb = CPANPLUS::Backend->new(); my $mod = $cb->module_tree("IO::Stty"); print Dumper($mod); printf("PACKAGE(%s) VERSION(%s)\n",$mod->package_name, $mod->package_version)' $VAR1 = bless( { 'mtime' => '', 'version' => '.02', '_id' => 1, 'author' => bless( { 'email' => 'tex@habit.com', '_id' => 1, 'cpanid' => 'AUSCHUTZ', 'author' => 'Austin Schutz' }, 'CPANPLUS::Module::Author' ), 'dslip' => 'Rdpfp', 'path' => 'authors/id/A/AU/AUSCHUTZ', 'description' => 'POSIX compliant stty interface', 'package' => 'IO-Stty-.02.tar.gz', 'comment' => undef, 'module' => 'IO::Stty' }, 'CPANPLUS::Module' ); PACKAGE() VERSION() The regex in CPANPLUS/Internals/Utils.pm needs to be updated --- /usr/local/share/perl/5.8.8/CPANPLUS/Internals/Utils.pm 2009-03-29 18:34:27.000000000 -0400 +++ ../lib/CPANPLUS/Internals/Utils.pm 2009-03-29 18:33:46.000000000 -0400 @@ -495,7 +495,7 @@ )* /xi; - my $ver_re = qr/[a-z]*\d+[a-z]* # contains a digit and possibly letters + my $ver_re = qr/[a-z.]*\d+[a-z]* # contains a digit and possibly letters (?: [-._] # followed by a delimiter [a-z\d]+ # and more digits and or letters
Hi, thanks for reporting this issue, but it was already fixed in CPANPLUS 0.85_05: "* New edge case in package naming discovered; adapt regex and add tests" See the changelog for details: http://cpansearch.perl.org/src/KANE/CPANPLUS-0.85_05/ChangeLog Cheers,