<div dir="ltr">Yes, PAUSE allows case-sensitive conflicts, the trouble comes in that you can't install conflicting modules on a case insensitive system (Common::Sense and common::sense, for example).<div><br></div><div>Anyway...<br><div><br></div><div>In your search body I would change "match" to "term" since "status" is an exact string match.</div><div><br></div><div>Additionally the filters in</div><div><a href="https://github.com/CPAN-API/cpan-api/blob/master/lib/MetaCPAN/Document/File.pm#L860">https://github.com/CPAN-API/cpan-api/blob/master/lib/MetaCPAN/Document/File.pm#L860</a><br></div><div>should be used, as results can be incorrect without all of them.</div><div><br></div><div>So you'd want something like this:</div><div><br></div><div><div>{</div><div> "filter": {</div><div> "and": [</div><div> { "term": { "module.name.lowercase": "lwp::useragent" } },</div><div> { "term": { "status": "latest" } },</div><div> { "term": { "file.indexed": true } },</div><div> { "not": { "term": { "file.authorized": false } } }</div><div> ]</div><div> },</div><div> "fields": ["module", "author", "release"]</div><div>}</div></div><div><br></div><div>Note that you can use "fields" to get back just the values you're interested in.</div><div><br></div><div>Unfortunately the issue you referred to with GET limitations is even worse in this case.</div><div><br></div><div>I think the shortest thing you could do for GET would be:</div><div>curl '<a href="http://api.metacpan.org/v0/module/?q=module.name.lowercase:lwp\%3A\%3Auseragent+AND+status:latest">api.metacpan.org/v0/module/?q=module.name.lowercase:lwp\%3A\%3Auseragent+AND+status:latest</a>'<br></div><div>(you can append "&fields=module,author,release" or similar if desired)<br></div><div><br></div><div>Note that you have to backslash escape the colons in the module name and you need an uppercase AND before status:latest.</div></div><div><br></div><div>This is less efficient, however, since it is using a "querystring" query instead of filters. I cannot find documentation to suggest that it is possible to use this shortcut syntax with filters.</div><div><br></div><div>It may be worth noting that the current "/v0/module/Mod::Name" api additionally searches the "documentation" field to find files where the pod is separate from the packages. That field also has a lowercase-analyzed field. It then tries to choose the most relevant of the results. I'm not sure if that logic is relevant for your use case or not.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 20, 2015 at 8:18 AM, SundaraRaman R <span dir="ltr"><<a href="mailto:sundaryourfriend@gmail.com" target="_blank">sundaryourfriend@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Found the thread: <a href="http://www.perlmonks.org/?node_id=345472" rel="noreferrer" target="_blank">http://www.perlmonks.org/?node_id=345472</a> . Looks<br>
like I was off by 9 years on the date.<br>
<br>
Running that script on the current 02packages.details.txt gives back<br>
125 pairs now (compared to 44 as of 2004). But it does appear that,<br>
like someone on that thread mentions, many of these are changes<br>
between different versions of the same distribution, rather than<br>
outright conflicts, and would disappear if we chose only the latest<br>
version of each distribution to compare. I guess this might be an easy<br>
job now with MetaCPAN, but I lack the ElasticSearch wizardry to do<br>
this myself.<br>
<span class="im HOEnZb"><br>
On Sat, Jun 20, 2015 at 8:28 PM, SundaraRaman R<br>
<<a href="mailto:sundaryourfriend@gmail.com">sundaryourfriend@gmail.com</a>> wrote:<br>
> I looked into that, and found a Perlmonks thread from 2013 (I think)<br>
> where someone had written a script to find modules that differed only<br>
> by case, and found there were 44 such pairs back then (I'll post the<br>
> link to the thread when I manage to find it again). So, it appears<br>
> PAUSE does allow that.<br>
><br>
> But in this case, that is an edge case that I think is okay to ignore<br>
> - I'm hoping that whatever the solution is, it will also tell us when<br>
> there is more than one match, so that in those ambiguous cases we can<br>
> avoid showing the user anything.<br>
><br>
> -<br>
> Sundar<br>
><br>
<br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
MetaCPAN mailing list<br>
<a href="mailto:MetaCPAN@lists.scsys.co.uk">MetaCPAN@lists.scsys.co.uk</a><br>
<a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/metacpan" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/metacpan</a><br>
</div></div></blockquote></div><br></div>