Skip to content

Commit

Permalink
connect author to releases, return RS
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyn committed Apr 27, 2014
1 parent c3075ad commit cab0ddb
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/MetaCPAN/Client/Author.pm
Expand Up @@ -25,6 +25,21 @@ foreach my $field (@known_fields) {

sub _known_fields { return \@known_fields }

sub releases {
my $self = shift;
my $id = $self->pauseid;

require MetaCPAN::Client;

return
MetaCPAN::Client->new->release({
all => [
{ author => $id },
{ status => 'latest' },
]
});
}

1;

__END__
Expand Down Expand Up @@ -100,3 +115,11 @@ Array of Author's websites.
=head2 user
=head1 METHODS
=head2 releases
my $releases = $author->releases();
Search all releases of current author's object.
will return a ResultSet of MetaCPAN::Client::Release objects.

0 comments on commit cab0ddb

Please sign in to comment.