我创建了
whichpm,一个跨平台CLI(Linux,OSX,Window),通过模块(包)名定位已安装的Perl模块,并且可选地报告有关它们的信息,包括检测偶然的重复。
例子
# Locate the Data::Dumper module.
$ whichpm Data::Dumper
/usr/lib/perl/5.18/Data/Dumper.pm
# Locate the Data::Dumper module,and also print
# version information and core-module status.
$ whichpm -v Data::Dumper
Data::Dumper 2.145 core>=5.005 /usr/lib/perl/5.18/Data/Dumper.pm
# Locate the Data::Dumper module and open it in your system's default text
# editor.
$ whichpm -e Data::Dumper
# Look for accidental duplicates of the Foo::Bar module.
# Normally,only 1 path should be returned.
$ whichpm -a Foo::Bar
/usr/lib/perl/5.18/Foo/Bar.pm
./Foo/Bar.pm
# Print the paths of all installed modules.
$ whichpm -a
安装
先决条件:安装了Perl v5.4.50或更高版本的Linux,OSX或Windows。
从npm注册表安装
[sudo] npm install whichpm -g
手动安装(OSX和Linux)
>下载the CLI。>使它可执行的chmod x whichpm。>将其移动或符号链接到$ PATH中的文件夹,例如/usr/local/bin(OSX)或/ usr / bin(Linux)。