metacpan-api icon indicating copy to clipboard operation
metacpan-api copied to clipboard

'module' entry reports wrong module

Open xsawyerx opened this issue 7 years ago • 2 comments

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.

xsawyerx avatar Nov 07 '16 13:11 xsawyerx

Fixed

ranguard avatar Nov 20 '16 19:11 ranguard

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.

haarg avatar Dec 08 '16 17:12 haarg