How do I get a list of installed CPAN modules?

后端 未结 29 2194
盖世英雄少女心
盖世英雄少女心 2020-12-04 07:41

Aside from trying

perldoc 

individually for any CPAN module that takes my fancy or going through the file system and loo

29条回答
  •  囚心锁ツ
    2020-12-04 07:59

    Here a script which would do the trick:

    use ExtUtils::Installed;
    
    my $inst = ExtUtils::Installed->new();
    my @modules = $inst->modules();
    foreach $module (@modules){
           print $module ." - ". $inst->version($module). "\n";
    }
    
    =head1 ABOUT
    
    This scripts lists installed cpan modules using the ExtUtils modules
    
    =head1 FORMAT
    
    Prints each module in the following format
     - 
    
    =cut
    

提交回复
热议问题