Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 022010

How to find a Perl Module's Path


For example, we want to know where the module JSON and related modules exist in the local file system, we can try:

# perl -MJSON -e'print $_ . " => " . $INC{$_} . "\n" for keys %INC' => /usr/share/perl/5.10/ => /usr/local/lib/perl/5.10.0/
warnings/ => /usr/share/perl/5.10/warnings/ => /usr/share/perl/5.10/
Exporter/ => /usr/share/perl/5.10/Exporter/
common/ => /usr/local/share/perl/5.10.0/common/ => /usr/share/perl/5.10/ => /usr/share/perl/5.10/ => /usr/share/perl/5.10/ => /usr/local/share/perl/5.10.0/ => /usr/share/perl/5.10/
JSON/ => /usr/local/lib/perl/5.10.0/JSON/ => /usr/share/perl/5.10/ => /usr/share/perl/5.10/ => /usr/local/share/perl/5.10.0/

  One Response to “How to find a Perl Module’s Path”

  1. Thanks a bunch. This was extremely helpful!

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>