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

Module::Metadata can't parse MLEHMANN/common-sense #27

Open
xenu opened this issue Mar 6, 2017 · 5 comments
Open

Module::Metadata can't parse MLEHMANN/common-sense #27

xenu opened this issue Mar 6, 2017 · 5 comments

Comments

@xenu
Copy link

xenu commented Mar 6, 2017

Module::Metadata can't handle MLEHMANN/common-sense. It's a very unusual distribution, looks like its author tried really hard to abuse PAUSE indexer as much as possible.

There are following problems:

  • ->package_versions_from_directory ignores .PL files (package and $VERSION are declared in sense.pm.PL).
  • stuff in __DATA__ is ignored (that's where package is declared in that distribution).
  • As opposed to Module::Metadata, PAUSE indexer doesn't really care in which package $VERSION was declared. With some exceptions, the first $VERSION definition is used with all packages in the parsed file ($VERSION is declared in main, not in common::sense).
@xenu
Copy link
Author

xenu commented Mar 6, 2017

@karenetheridge
Copy link
Member

karenetheridge commented Mar 6, 2017

If the shipped distribution deliberately obfuscates the code before installation, then we can't do much -- Module::Metadata will properly parse the installed code however.

@haarg
Copy link
Member

haarg commented Mar 6, 2017

It isn't obfuscation. It's generating a module because it has platform specific data in it. PAUSE has intentional support for extracting version information from a .PL file that is used to generate a module.

@Leont
Copy link
Member

Leont commented Mar 7, 2017

I'm not sure in what context this is a problem…

@shadowcat-mst
Copy link
Member

@Leont Dist::Metadata uses Module::Metadata to index dists, which means that both metacpan and my App::opan end up with confused results indexing dists. We should probably do something about this, whether it's adding an extra API designed for indexing source rather than an installed tree or just adding support for it to the existing API

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

5 participants