On Nov 16, 2003, at 6:32 PM, John Delacour wrote:

I reinstalled 5.8.1 from source twice and everything went fine until I upgraded certain modules. In the end I installed 5.8.2 with the Apple way, ie. to replace 5.8.1, and since then everything has been fine. All my modules have been updated except for Filter::Simple, which cpan always reports as being one point behind in spite of updating.

It's because Filter::Simple is installed in two places, and the later install did not remove or overwrite the first one.


I've been tracking this down on my own system, and finally figured out what is happening. It's *not* an OS X-specific problem; it happened on my Redhat system, too.

When there's a module installed with the initial Perl installation (I think this is called a "core" module), and you try to upgrade that module, the upgraded module gets installed in a different place than the original module, yet the @INC include path is such that the original module gets found first.

Say Filter::Simple is installed under /System/Library/Perl. By either looking at its version number by hand, or using the CPAN "r" command, we see that it's 0.79. We update it to 0.80. The update is installed under /Library/Perl. But our perl's @INC path says to look first in /System/Library, where it finds the 0.79 version.

I finally "solved" this on my system by tracking down which modules weren't being updated, and just deleting the older versions -- from /System/Library/Perl if necessary.

However, the right way to solve this is to use the UNINST=1 flag when you install Perl modules. From the CPAN FAQ ("man CPAN"):

1) I installed a new version of module X but CPAN keeps saying, I have
the old version installed


Most probably you do have the old version installed. This can hap-
pen if a module installs itself into a different directory in the
@INC path than it was previously installed. This is not really a
CPAN.pm problem, you would have the same problem when installing
the module manually. The easiest way to prevent this behaviour is
to add the argument "UNINST=1" to the "make install" call, and that
is why many people add this argument permanently by configuring


o conf make_install_arg UNINST=1

2) So why is UNINST=1 not the default?

Because there are people who have their precise expectations about
who may install where in the @INC path and who uses which @INC
array. In fine tuned environments "UNINST=1" can cause damage.


Personally, this causes me enough hassle that I really wish UNINST=1 *was* the default.

--
John Labovitz photography
www.johnlabovitz.com
[EMAIL PROTECTED]
+1 503.873.6734



Reply via email to