I am in an environment with a fairly old Perl and I've discovered that the didn't even have a cpan utility. So what do you do? You go to cpan.org and download it., then build it. The trouble is, since I had no cpan utility, I have to handle all the dependencies manually and back up/resume every time I had to download another module. In the end, I had downloaded & installed: - CPAN-Test-Dummy-Perl5-Make-1.05 - CPAN-Test-Dummy-Perl5-Make-CircDepeOne-1.00 - CPAN-Test-Dummy-Perl5-Make-CircDepeThree-1.00 - CPAN-Test-Dummy-Perl5-Make-CircDepeTwo-1.00 - CPAN-Test-Dummy-Perl5-Make-Zip-1.03 before finally getting a clean "make" on CPAN-2.10 itself.

Now I try to run the cpan utility for the first time in my home directory. Note that I will opt for the "sudo" option for installing modules. Here's the session:

Code

$ cpan Loading internal null logger. Install Log::Log4perl for logging messagesThe system CPAN configuration file has provided some default values, but you need to complete the configuration dialog for CPAN.pm. Configuration will be written to <</export/home/jsalomon/.cpan/CPAN/MyConfig.pm>>

CPAN.pm requires configuration, but most of it can be done automatically. If you answer 'no' below, you will enter an interactive dialog for each configuration option instead.

Would you like to configure as much as possible automatically? [yes]

Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/5.8.7/App/Cpan.pm line 633, <STDIN> line 1. <install_help>

Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or escalate your privileges. CPAN can help you by bootstrapping the local::lib module or by configuring itself to use 'sudo' (if available). You may also resolve this problem manually if you need to customize your setup.

What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') [local::lib] sudo

The message about Loading internal null logger: When I tried to make Log::Log4perl, every blessed (ahem) pm module had a compile error in the POD: The directive =encoding utf8 is not understood. I'd have to run a massive sed and save operation to fix all of that. So I will make do with the null logging.

But the Use of uninitialized value is quite the gluteal pain! The actual line of code are:

If you need to update or install new modules for the system perl, you should "sudo bash" first, then do your install. If you don't have "sudo bash" rights, then you need to either have someone else install it for you, or use perlbrew to install a new version of perl under your home directory so that you have full control over it.

Of course I had sudo rights, Fishmonger; else I would not have been able to successfully "make install". The actual install command was:

Code

$ sudo make install

My problem is not about installing cpan itself, although I described a bunch of problems with that aspect as well. (In retrospect, I should have omitted all that but it was too late for me to think that straight. )

The problem occurred when I was trying to execute the cpan command, which does not require sudo privileges in my own blessed home directory. The code I quoted - the location of the run-time error - indicates that this function expects 2 parameters but seems to have been called with 1 parameter, likely owing to the age of the Perl. I suspect an older release of CPAN.pm would have a one-parameter version of that function. My main question was: Which release of CPAN.pm does this? A bigger question might be: How would I go about determining this, short of downloading every blessed release, unTARring it, and examining that function? (So that I would not have to post a question in this forum.)

And yes, it is an ancient version of Perl my client is using. I have been trying to help my manager make the case with this client that they MUST upgrade a few things, like their release of the OS, the database engine (before the vendor grandfathers this one) and Perl. Unfortunately, VLCs (very large clients ), victims of their own success, tend to be a bit constipated in this area.

The items in red are not errors. The first one is simply an info message. The second one is a warning, not an error.

I'm not sure what you were expecting make Log::Log4perl to do. That's not how to install a module or how make is used.

The permission warning is not referring to creating the .cpan directory under your home directory; it's referring to the / directory and at this point I'm not sure if you were running the command with sudo rights or not.

What System (OS) are you working on? You can get a fairly good idea if the latest cpan will work on your system from here: http://matrix.cpantesters.org/?dist=CPAN+2.10. You can also look at older releases to see which one has the best chances of working on older perl's.

Since you're wanting to install this for the system perl, then start by doing what I first suggested, which was to sudo bash first, then do the install. This resolves the possible problem of forgetting to run one or more of the commands under sudo rights.

I posted the first message out of sheer, cussed stubbornness; I was sure that, with help from this forum, I could get modules installed the proper way.

Well, with more discoveries about my environment, my notorious stubborn streak has finally cracked! There are too many possible ways to go about this, none of which guarantee success. It was built by the Borg and persistence is useless.

The only way I will be able to get this environment (of over a dozen Solaris hosts) into shape is by convincing the client to upgrade their Perl to the latest; I believe a working cpan with come alone for the ride with that. Or will at be compilable. Until that happens, I will be installing modules manually.