libraries.io
libraries.io copied to clipboard
Get all CPAN distributions using scroll API for MetaCPAN
- Get all CPAN distributions using scroll API for MetaCPAN
- Revert "Remove CPAN from missing task"
Fixes https://github.com/librariesio/libraries.io/issues/1961.
irb(main)> PackageManager::CPAN.project_names.size
=> 37945
which is roughly what we get from
$ curl -s 'https://fastapi.metacpan.org/v1/release/_search?q=status:latest' | jq '.hits.total'
37972
Of note, searching for distributions directly gets:
$ curl -s 'https://fastapi.metacpan.org/v1/distribution/_search' | jq '.hits.total'
42548
I'm not yet sure about why there is a discrepancy.
I think I could shorten the code a little bit by using a ternary operator inside the loop. Let me know which approach you prefer!
@tiegz , @jsonperl, any thoughts? I believe I’ll need to rebase this now.
If this isn’t the right place or the right issue to tackle, let me know.
Fixed the merge conflict.
Hello! What can I do to get this merged or, if needed, implement similar functionality in another repository?