1 package BackPAN::Index::Dist;
7 use BackPAN::Index::Role::AsHash;
10 q[""] => sub { $_[0]->name },
16 first_release first_date first_author
17 latest_release latest_date latest_author
24 return $self->releases->search(undef, { distinct => 1 })->get_column("cpanid")->all;
33 BackPAN::Index::Dist - Representing a distribution on BackPAN
37 Use through BackPAN::Index.
41 An object representing a distribution on BackPAN. A distribution is
46 my $releases = $dist->releases;
48 A ResultSet of this distribution's releases.
52 my $dist_name = $dist->name;
54 Name of the distribution.
58 my @authors = $dist->authors;
60 Return the CPANIDs which made releases of this $dist, in no particular order.
64 my $num_releases = $dist->num_releases;
66 Returns the number of releases this distribution has.
72 my $release = $dist->first_release;
74 Returns the first or latest release of this distribution as a BackPAN::Index::Release.
80 my $release = $dist->first_date;
82 Returns the date of the first or latest release of this distribution.
88 my $cpanid = $dist->first_author;
90 Returns the CPANID of the author of the first or latest release.
94 my $data = $dist->as_hash;
96 Returns a hash ref containing the data inside C<$dist>.