Subject: | distributions only attributed to one author |
Hi Leon,
In _init_dist_by(), the code to generate the $dist_by hash,
unfortunately only attributes a distribution to one author. Where
multiple releases have been released by different authors, this
accidentally ignores some contributions when using distribution_by().
Attached patch makes the necessary alteration to credit all
authors/maintainers/release managers of a particular distribution.
Cheers,
Barbie.
Subject: | backpan-multipleauthors.patch |
/Parse-BACKPAN-Packages/Parse-BACKPAN-Packages-0.33/lib/Parse/BACKPAN/Packages.pm Sun Jun 8 10:36:39 2008
/Parse-BACKPAN-Packages/Parse-BACKPAN-Packages-0.33_02/lib/Parse/BACKPAN/Packages.pm Thu Sep 18 10:34:06 2008
@@ -129,15 +129,12 @@
my $i = CPAN::DistnameInfo->new($file->prefix);
my ($dist, $cpanid) = ($i->dist, $i->cpanid);
next unless $dist && $cpanid;
- $dist_by->{$dist} = $cpanid;
+ $dist_by->{$cpanid}{$dist}++;
}
- my $dists_by;
- while (my ($dist, $by) = each %$dist_by) {
- push @{ $dists_by->{$by} }, $dist;
- }
+ my %dists_by = map {$_ => [keys %{$dist_by->{$_}}] } keys %$dist_by;
- return $dists_by;
+ return \%dists_by;
}
sub size {