I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2005-03-26 07:36:14-08 by szabgab
duplicate distributions ?
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 ?

Direct Responses: 317 | Write a response
Posted on 2005-04-09 04:33:51-07 by rkobes in response to 263
Re: duplicate distributions ?
It's a property of 02packages.details.txt. This file maps module to distribution names (and versions), and so if a module in one version of a distribution gets dropped (or renamed) in a later version of the distribution, 02packages.details.txt will have two versions of the distribution. eg, for Zanas: Zanas 0.9954 D/DM/DMOW/Zanas-0.9954.tar.gz Zanas::Dawdler undef D/DM/DMOW/Zanas-5.3.25.tar.gz Zanas::Docs undef D/DM/DMOW/Zanas-5.3.25.tar.gz Zanas::InternalRequest undef D/DM/DMOW/Zanas-5.3.25.tar.gz Zanas::Loader undef D/DM/DMOW/Zanas-5.3.25.tar.gz Zanas::Request undef D/DM/DMOW/Zanas-5.3.25.tar.gz Zanas::Request::Upload undef D/DM/DMOW/Zanas-5.3.25.tar.gz
Direct Responses: Write a response