iang has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have a problem building JSON::Any.pm.

I am builing the make file by the command perl Makefile.PL PREFIX=/home/foobar/Perllib LIB=/home/foobar/Perllib

The error i get is :

Cannot determine perl version info from lib/JSON/Any.pm *** Module::AutoInstall version 1.03 *** Checking for Perl dependencies... /home/foobar/.cpan/CPAN/MyConfig.pm initialized. CPAN is the world-wide archive of perl resources. It consists of about 100 sites that all replicate the same contents all around the globe. Many countries have at least one CPAN site already. The resources found on CPAN are easily accessible with the CPAN.pm module. If you want to use CPAN.pm, you have to configure it properly. If you do not want to enter a dialog now, you can answer 'no' to this question and I'll try to autoconfigure. (Note: you can revisit this dialog anytime later by typing 'o conf init' at the cpan prompt.) Are you ready for manual configuration? [yes]
and then tries to run cpan. I have searched the net at length but could not seem to find an answer, so i have come here where all the unanswerable questions seem to get answered. I am running a Redhat with perl 5.8.8. Thanks,

Replies are listed 'Best First'.
Re: problem installing JSON-ANY
by Tanktalus (Canon) on Aug 22, 2009 at 03:57 UTC

    A quick look at its Makefile.PL shows two things. First, it uses "Module::Install" via a use inc::Module::Install; line. And, second, near the end, a call to auto_install. Reading the docs on Module::Install shows that "[t]he use of auto_install is strongly discouraged in any distribution to be uploaded to the CPAN, as the use of it violates the normal CPAN client to toolchain communication protocol." That seems to me to mean that it's probably a bug: the author of JSON::Any is using a feature in a way unintended by the author.

    Simply removing that line from the Makefile.PL will eliminate this behaviour, though whatever dependency it's trying to suck in won't be met and you'll need to install those first.

Re: problem installing JSON-ANY
by Khen1950fx (Canon) on Aug 22, 2009 at 04:00 UTC
    I don't see the error here. It's normal for a Makefile.PL to call CPAN to download missing dependencies or features. If you don't want CPAN to download the dependencies, then just have a look at the Makefile.PL, find out what the dependencies are, and then manually download and install each dependency before you try to install JSON::Any.
      I'm not sure how normal that is, I've only ever seen modules using Module::Install try to do that. It makes sense if you're installing through the CPAN interface (module, shell or commandline) in which case CPAN takes care of it, but not for running perl Makefile.PL.