We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 802e212 commit b3a4a45Copy full SHA for b3a4a45
lib/MetaCPAN/Query/Package.pm
@@ -28,9 +28,9 @@ sub get_modules {
28
}
29
);
30
31
- my $hits = $res->{hits}{hits};
32
- return [] unless @{$hits};
33
- return +{ modules => [ map { $_->{_source}{module_name} } @{$hits} ] };
+ return unless $res->{hits}{total};
+ return +{ modules =>
+ [ map { $_->{_source}{module_name} } @{ $res->{hits}{hits} } ] };
34
35
36
__PACKAGE__->meta->make_immutable;
0 commit comments