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

后端 未结 9 731
小蘑菇
小蘑菇 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条回答
  •  萌比男神i
    2021-01-30 11:03

    To expand on @Ivan's answer that allows this to be run without installing additional software the following will use Perl's debugger to find a specific module (or modules):

    perl -de 'use ;'
    

    For Example:

    perl -de 'use DBD::Oracle;'
    

    Output:

    Loading DB routines from perl5db.pl version 1.37
    Editor support available.
    
    Enter h or 'h h' for help, or 'man perldebug' for more help.
    
    DBD::Oracle::CODE(0x27f81d8)(/usr/local/lib64/perl5/DBD/Oracle.pm:113):
    113:            $ENV{PERL_BADFREE} = 0;
      DB<1> q
    

提交回复
热议问题