metacpan-api
metacpan-api copied to clipboard
'module' entry reports wrong module
The way the module endpoint works is wrong, probably because of the underlying structure treating modules as files. Instead of giving you the definite and authoritative module, it gives you a result of a module it finds[1].
Example: https://v1.metacpan.org/module/warnings
This leads to Apache::Test
instead of warnings
.
You can see it here as well:
$ perl -MMetaCPAN::Client -E'say MetaCPAN::Client->new->module("warnings")->distribution'
Apache-Test
[1] I don't know if it's the first it finds, the first it indexed, or what other metric it uses to pick one out of many.
Fixed
This is still an issue for https://metacpan.org/pod/overload for similar reasons. The scoring used in the query doesn't seem reliable now that we are using sharding.