Perl-Toolchain-Gang / CPAN-Common-Index

Common library for searching CPAN indexes
8 stars 10 forks source link

[WIP] CPAN::Common::Index::MetaCPAN #14

Closed miyagawa closed 6 years ago

miyagawa commented 9 years ago
miyagawa commented 9 years ago

Note: the problem with cpan://$host/distfile is that given a host name like 'www.cpan.org' how do a client know it's http or https? Websocket URL ws:// had the same issue and they needed to add wss:// protocol as well.

Maybe: cpan+https:// like 'git+ssh:' protocol.

dagolden commented 9 years ago

I prefer 'cpan+https', I think

miyagawa commented 9 years ago

live unit test is added. I tried not to make a brittle test, but it is arguable that if MetaCPAN search breaks something, this test will fail as well, so I'm happy to make this an author-only test. cc @oalders

miyagawa commented 9 years ago

URI::cpan added a notion of remote host (well, remove the restriction on it).

Meanwhile I have an extra download_uri in the result hash so that cpanm can honor that, and I'm fine with that.

miyagawa commented 9 years ago

@clintongormley is taking this exact implementation as a new endpoint on metacpan API, so that we can eliminate all the logic in here. https://github.com/CPAN-API/cpan-api/commit/4011d5b969302595ce7f87af8d5190f8c6b7b5ed

miyagawa commented 6 years ago

closing and will reopen another for the new download_url support.