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

Galaxy picture Galaxy · Oct 13, 2009 · Viewed 71.8k times · Source

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 Grid Engine system. Sometimes, even run as other username.

I can use CPAN.pm to install packages for myself, but it is not so easy to install for other users without chmod 666 on folders.

Answer

jrockway picture jrockway · Oct 13, 2009

perl -MTime::HiRes -e 'print $INC{"Time/HiRes.pm"}' or perldoc -l Time::HiRes