brewzzer has asked for the wisdom of the Perl Monks concerning the following question:
Trying to run a perl script that uses the perl module JSON. I installed the module, but when I run the script, I get: "Can't locate JSON.pm in @INC"
When I tried re-installing the module (cpanm JSON) I get: "JSON is up to date. (2.90)"
Can someone offer some hints? I'm a compete newbie on UNIX and installing modules, so please talk in baby terms.
I understand that modules need to be in @INC, but I don't understand why it is not so automatically after a successsful installation, or how to make it so.
The line in the perl script calling JSON is this: use JSON;
If JSON.pm is not in @INC, can I specific a path in the line above to make it accessible to the script? If so, how would I go about finding that path, and what would be the format of the line in the perl script?
Thanks!
UPDATE: Guys -- Thank you for your great help. With your advice, I was able to quickly understand and solve the problem, and gain some knowledge that will help me in the future. You guys are awesome! Thanks again.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't locate JSON.pm in @INC
by BaldManTom (Friar) on Feb 14, 2014 at 01:00 UTC | |
|
Re: Can't locate JSON.pm in @INC
by Anonymous Monk on Feb 13, 2014 at 20:21 UTC | |
|
Re: Can't locate JSON.pm in @INC
by locked_user sundialsvc4 (Abbot) on Feb 14, 2014 at 01:56 UTC | |
|
Re: Can't locate JSON.pm in @INC
by Sagacity (Monk) on Feb 13, 2014 at 21:46 UTC | |
|
Re: Can't locate JSON.pm in @INC
by dwm042 (Priest) on Feb 14, 2014 at 19:12 UTC | |
|
Re: Can't locate JSON.pm in @INC
by jethro (Monsignor) on Feb 13, 2014 at 22:37 UTC |