Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"modules" returned by ExtUtils::Installed don't really make any sense #33

Open
Grinnz opened this issue Nov 9, 2020 · 0 comments
Open

Comments

@Grinnz
Copy link

Grinnz commented Nov 9, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant