How can I tell if a Perl module is core or part of the standard install?

前端 未结 7 712
猫巷女王i
猫巷女王i 2020-12-13 06:04

How can I check if a Perl module is part of the core - i.e. it is part of the standard installation?

I\'m looking for:

  • a command-line command:
7条回答
  •  旧巷少年郎
    2020-12-13 06:31

    In a response to a comment of Gbacon's, you say that you want the answer to be platform neutral. I don't know of such a solution, but I wonder if it's even the right way to go.

    If your goal is to find out on specific machines, I would use the tools that come with the platform. On Debian, that would include dpkg (pre-installed on any Debian system) or apt-file (not pre-installed necessarily) or other APT tools.

    As an example, take a look at the output of this:

    dpkg-query -L perl | less
    

    You would obviously need to parse the output, but it strikes me as a start precisely because it is specific to the machine in question.

提交回复
热议问题