CPAN-API/cpan-api — Issue #149: Attempt to determine "main module" for a release
Author: rwstauner
Created: 2011-12-10 18:01:07+00:00
State: open

There are a lot of places where the "main module" for a dist would nice be to have.
The usual hack to get it is `$release =~ s/-/::/g`,
however we could try a little harder to guess it:

* Makefile.PL has ABSTRACT_FROM or VERSION_FROM
* dist.ini has main_module (or defaults to the `s///`)
* if the `s///` results in a module that doesn't exist, maybe just take the shortest/most common module namespace (for instance `LWP` or `Template`)

I don't know if there other/better alternatives, and many of these wouldn't always work,
but combining them (falling back to the `s///`) might work more often than any of them alone.

We could use the main_module for things like

* dist abstract #107
* more useful reverse dependencies link