0

I'm having difficulty installing the JSON module (Perl version) on my Mac. Per the CPAN website's recommendations, I installed the "XCode" package and the "cpanminus" tool app before attempting to install the JSON module. I do not have the "local::lib" app installed.

Anyway, after downloading JSON::PP to my "Downloads" folder, I opened the README file, which simply says: To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

Type where? I suppose on the terminal command line? So I pasted "perl Makefile.PL" on the terminal command line and got: "Can't open perl script "Makefile.PL": No such file or directory jdm@Jeffs-iMac ~ %. Thinking that the pathway to the file was required, I then entered the following on the terminal command line: /Users/jdm/Downloads/JSON-PP-4.05/perl Makefile.PL". That also failed to run the "perl Makefile.PL" script, returning "zsh: no such file or directory: /Users/jdm/Downloads/JSON-PP-4.05/perl".

I'm just beginning to learn Perl, and this hurdle needn't be. There must be an easier, less frustrating way to install this JSON module. Please help. Thanks.

Jeff
  • 179
  • 10
  • 3
    Perl comes *with* `JSON::PP`... shouldn't have to install it. – Shawn Oct 12 '20 at 16:24
  • How do I confirm that I already have JSON::PP? – Jeff Oct 12 '20 at 16:27
  • 1
    @Jeff — Evaluating a Perl script with `1` in it and nothing else shouldn't give you a response. That you don't get an error when trying to load the module indicates that it is installed. – Quentin Oct 12 '20 at 16:32
  • 1
    `perldoc -l JSON::PP` will tell you where the module been installed. – vkk05 Oct 12 '20 at 16:32
  • 2
    `perl -MJSON::PP -e1` should not fail. – choroba Oct 12 '20 at 16:32
  • 2
    (A literal answer would tell you that you need to `cd /Users/jdm/Downloads/JSON-PP-4.05/` and then run the commands, but that won't make a difference since you have the module installed already) – Quentin Oct 12 '20 at 16:33
  • Thanks for everyone's help. After entering: "perldoc JSON::PP" on the terminal command line, I get confirmation that JSON::PP is installed! Case closed. – Jeff Oct 12 '20 at 16:35

0 Answers0