How do I get a list of installed CPAN modules?

后端 未结 29 2109
盖世英雄少女心
盖世英雄少女心 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 08:08

    Here's a really hacky way to do it in *nix, you'll get some stuff you don't really care about (ie: warnings::register etc), but it should give you a list of every .pm file that's accessible via perl.

    
    for my $path (@INC) {
        my @list = `ls -R $path/**/*.pm`;
        for (@list) {
            s/$path\///g;
            s/\//::/g;
            s/\.pm$//g;
            print;
        }
    }
    
    

提交回复
热议问题