-
Notifications
You must be signed in to change notification settings - Fork 12
Description
ExtUtils::Installed parses packlists and stores a list of "modules", except they are actually the distribution names with ::. Many distributions have no such module by that name, and this also means secondary module names contained in the distribution are not listed at all.
For example, the libwww-perl distribution has a packlist stored in libwww/perl/.packlist and thus the modules method returns libwww::perl, but that module does not exist. Several modules such as LWP and LWP::UserAgent which are contained in that distribution are not returned.
To avoid backcompat issues I suggest adding two or three new methods and update new() to store the proper information:
- distributions - returns the actual distribution names, like
libwww-perl, one per packlist. - all_modules - returns all modules actually found in packlists.
- main_modules - returns one module per distribution, but make sure it's one that actually exists.
The last two functions could be one new method with a parameter indicating whether you want all modules or just one from each distribution. Or they could both be functionality added to the modules method via new parameters.
I volunteer to contribute methods along these lines eventually if no one else does.