Closed miyagawa closed 6 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.
I prefer 'cpan+https', I think
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
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.
@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
closing and will reopen another for the new download_url support.