列出已安装的Perl模块

  | 转载时请务必以超链接形式标明文章原文链接和作者信息及本版权声明。
原文链接:http://www.liaojl.com/archives/2007/11/perl-list-modules.html

下面脚本可以列出所以已安装的Perl模块。

#! /usr/bin/perl
 
use strict;
use ExtUtils::Installed;
 
my $inst= ExtUtils::Installed->new();
my @modules = $inst->modules();
 
foreach(@modules)
{
    my $ver = $inst->version($_) || "???";
    printf("%-12s --  %s\n", $_, $ver);
}
exit 0;

Leave a comment

Archives

Creative Commons License
This blog is licensed under a Creative Commons License.