App-lcpan-CmdBundle-similar_authors
view release on metacpan or search on metacpan
lib/App/lcpan/Cmd/similar_authors_from_related_mods.pm view on Meta::CPAN
},
};
sub handle_cmd {
my %args = @_;
my $state = App::lcpan::_init(\%args, 'ro');
my $dbh = $state->{dbh};
my $author = $args{author};
my $author_rec = $dbh->selectrow_hashref("SELECT * FROM author WHERE cpanid=?", {}, $author)
or return [404, "No such author: $author"];
my $modules;
{
my $sth = $dbh->prepare("SELECT name FROM module WHERE cpanid=?");
$sth->execute($author);
while (my $row = $sth->fetchrow_hashref) {
push @$modules, $row->{name};
}
}
@$modules or return [412, "Author '$author' does not have any modules"];
( run in 2.696 seconds using v1.01-cache-2.11-cpan-8f98c5d2c55 )