I was using this module to populate the database of CPAN::Forum with the names of distributions.
I have just noticed that I get several distributions fetched twice from the source file
This piece of code would demonstrate it:
use Parse::CPAN::Packages;
my $p = Parse::CPAN::Packages->new("02packages.details.txt");
my @distributions = $p->distributions;
my %seen;
foreach my $d (@distributions) {
# skip scripts
#next if not $d->prefix or $d->prefix =~ m{^\w/\w\w/\w+/scripts/};
my $dist = $d->dist;
if (not $dist) {
warn "No dist encountered\n";
next;
}
if ($seen{$dist}++) {
warn "$dist seen already\n";
}
}
e.g. I get Zanas twice.
Is this a bug or a feature or am I using the module incorrectly ?