->reverse_dependencies returns only 50 results even if there are more
MetaCPAN::Client->reverse_dependencies returns only 50 results even if there are more, and doesn't automatically fetch more results if ->next on the resultset runs out of those 50
it seems MetaCPAN::Client wants to pass the request size via the POST parameters, but they're ignored unless they're in the query url
this monkeypatch seems to make it do the right thing:
my $old_fetch = \&MetaCPAN::Client::fetch;
my $new_fetch = sub { $old_fetch->( shift, shift . "?size=5000", @_ ) };
{ no warnings 'redefine'; *MetaCPAN::Client::fetch = $new_fetch; }
from IRC:
<haarg> it seems to be trying to pass an ES query, but the api isn't expecting that
<alh> reverse_dependencies() uses items instead of a scroller so it'll never fetch the next page if I'm reading it right
<alh> Or is the 'size => 5000' supposed to just "grab them all in one go"
<haarg> the extra arguments it passes are entirely ignored
<haarg> because that end point wants form type params (GET or POST) not a json body
Yeah I see the problem, the ES query is passed as an ignored param. the internal API query does the same without the size value. I'll patch that.
@mickeyn do you know where we are on this?
@oalders sorry I put this one aside for too long. I'll try to handle it soon.
No worries, @mickeyn. I don't think it's urgent. 😄