Tanuj
Tanuj

Reputation: 318

print the source path of a lib in perl

I modified some of the lib file ( .pm ) files which was under @INC path in perl and stored in a local folder. In my perl script i just used use lib and sourced to the local modified file... so i think my script will take the .pm files from local folder which is mentioned in use lib....but i wanted to make sure script is not taking those files from @INC path.. i know use lib will work .. but is there a way i can print the source path of the perl modules ( .pm ) used in my script ??

Upvotes: 1

Views: 492

Answers (1)

ikegami
ikegami

Reputation: 385496

%INC

$ perl -E'use LWP::UserAgent; say $INC{"LWP/UserAgent.pm"}'
/home/ikegami/usr/perlbrew/perls/5.18.1t/lib/site_perl/5.18.1/LWP/UserAgent.pm

Upvotes: 3

Related Questions