Subject: | Problems extracting information from at least one entry of 02packages.details.txt.gz |
Graham,
The CPAN::DistnameInfo fails to extract information at least for one
entry in the CPAN file 02packages.details.txt.gz.
Entries:
Spreadsheet::WriteExcel 2.16
J/JM/JMCNAMARA/Spreadsheet-WriteExcel-2.16.tar.gz
Spreadsheet::WriteExcel::WebPivot 0.01
N/NA/NATHANL/Spreadsheet-WriteExcel-WebPivot2.tar.gz
Example script
----------#!/usr/bin/perl -w
use strict;
use CPAN::DistnameInfo;
my $d;
$d =
CPAN::DistnameInfo->new('J/JM/JMCNAMARA/Spreadsheet-WriteExcel-2.16.tar.gz');
print $d->filename, "\n";
print "\tD: ", $d->dist, "\n";
print "\tV: ", $d->version, "\n";
$d =
CPAN::DistnameInfo->new('N/NA/NATHANL/Spreadsheet-WriteExcel-WebPivot2.tar.gz');
print $d->filename, "\n";
print "\tD: ", $d->dist, "\n";
print "\tV: ", $d->version, "\n";
----------
Output produced
----------
Spreadsheet-WriteExcel-2.16.tar.gz
D: Spreadsheet-WriteExcel
V: 2.16
Spreadsheet-WriteExcel-WebPivot2.tar.gz
D: Spreadsheet-WriteExcel
V: WebPivot2
----------
CPAN::DistnameInfo correctly extracts the version info from
"Spreadsheet-WriteExcel-2.16.tar.gz" but fails for the second entry
"Spreadsheet-WriteExcel-WebPivot2.tar.gz".
Regards,
/jpo