[Perl] Installation oneliners (was:perldoc and perl/tk)

Reuven M. Lerner reuven at lerner.co.il
Tue Nov 26 00:47:28 PST 2002

>>>>> "Shlomo" == Shlomo Yona <shlomo at cs.haifa.ac.il> writes:

    Shlomo> Yes. You are correct.  RPMs and CPAN modules are not
    Shlomo> synchronized.  I wonder how one can make the two methods
    Shlomo> talk (if at all), so they share the same version/package
    Shlomo> database.

CPAN is just a distribution mechanism for Perl modules.  There isn't
any "CPAN database" installed on your system when you install a module
from CPAN, although this isn't an inherently bad idea.

When you install a Perl module, it is noted in "perllocal" (available
by typing "perldoc perllocal").  Programs can get access to it via the
modules that Jaim and/or Shlomo mentioned earlier.

The RPM database is basically a set of Berkeley DB files that files
with packages.  So RPM allows you to know that /usr/bin/perl is part
of the perl-5.8.0-55 package.

When you install a Perl module via RPM, the RPM installer doesn't talk
to the Perl module installer.  In other words, the module is then
registered with RPM, but *not* with Perl's internal accounting system.

Similarly, when you install a Perl module via CPAN.pm, no one tells
RPM that new versions of various files have been installed on the
disk. It's thus possible that RPM will think that a file exists, when
it doesn't -- or that a file has been installed as part of an RPM,
when it was, in fact, installed separately.

So let's assume that you have a Red Hat system.  It's quite possible
to imagine the following scenario:

- You install Red Hat Linux, including Perl, via RPMs.
- The module CGI.pm is installed as an RPM.
- A new version of CGI.pm comes out, with a critical security fix.
- Using CPAN.pm, you find that there's a new version of CGI.pm.  You
  install it.  CPAN.pm now knows what version you've installed, and
  won't complain.
- Using Red Hat's up2date service, you install the *SAME* new version
  of CGI.pm, overwriting what was there before.  Now the RPM database
  knows what version you're using.

I don't think that anyone is working on combining these databases.
But it would be nice if they would be smart enough to communicate with
each other, in order to avoid the above scenarios.

What a mess!


More information about the Perl mailing list