How can I find out where a Perl module is installed?

后端 未结 9 643
小蘑菇
小蘑菇 2021-01-30 10:30

How do get the path of a installed Perl module by name, e.g. Time::HiRes?

I want this just because I have to run my perl script on different nodes of a SGE

9条回答
  •  伪装坚强ぢ
    2021-01-30 11:08

    I like to use the V module.

    Just install it from CPAN or by installing the package libv-perl on Debian or Ubuntu.

    Then use it like this:

    $ perl -MV=DBI
    DBI
        /Users/michiel/.plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0/darwin-2level/DBI.pm: 1.636
    

    Other output example:

    $ perl -MV=Time::HiRes
    Time::HiRes
        /usr/lib/perl/5.18/Time/HiRes.pm: 1.9725
    

提交回复
热议问题