in reply to Re^4: TT2 and FB between two different installations
in thread TT2 and FB between two different installations
Generally it is not advisable to mix OS updates and CPAN with core modules or those installed by a minimal debian install (since some of them get patched by debian). If the module was not already installed by debian, a cpan install is harmless
When you use CPAN, make sure it doesn't overwrite OS perl modules (that should normally be the case, as OS perl modules should reside in /usr/lib or /usr/share and cpan defaults to /usr/local AFAIK. Don't change that, then you are pretty safe).
But since you have updated core modules with cpan, one alternative would be just to try to live with it. Most of the time you should have no problems with that. Errno.pm is more the exception than the rule
The other alternative is as I said in my first post, just delete the stuff under /usr/local/share/perl and edit perllocal.pod accordingly. That should effectively rid you of your cpan-installed modules.
This is because your debian perl modules were not overwritten by cpan. The cpan modules have just a higher priority and so mask the original debian modules that are stored under /usr/share/
You can test this by installing a small perl module with apt-get and look where it was stored. Then install a newer version of the module with cpan and look where that was stored. Both versions should be on your disk, just in different dirs. Patch one with a print statement and find out which is used by a simple script (presumably the cpan version). Now delete that version (by deleting the <modulename>.pm) and the old version should be used again.
Another indication that this is true was your deletion of (cpan) Errno.pm. After that the install of cpio worked so perl must have found the original Errno.pm from debian.
So if you remove the cpan modules completely (or rename the dirs under /usr/share/perl/) you should have your native perl back. And then (after editing perllocal.pod? Don't know if this file is used by cpan) you can install cpan modules again, just make sure you don't touch system modules. CGI for example should be quite safe to install with cpan
PS: You asked about a dual perl installation in your first posting. That is easy if those perls differ in version (because one looks under /.../5.8.8/ for its modules, the other under /.../5.10/ for example) but with two perls of the same version you have to do much more. That's why I was talking about perl5.10. It just makes it easy to keep debian perl and cpan perl apart.
UPDATE: A fast way to check that none of the files in /usr/local/share/perl were installed by debians package manager:
dpkg -S tells you from which package a file is. Check the list. If none of the files are from a package, debian doesn't store any files there.find /usr/local/share/perl -print | xargs dpkg -S | less
By doing the same with /usr/share/perl and looking for non-package files you can find out if cpan has installed anything in debians area.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: TT2 and FB between two different installations
by LesleyB (Friar) on Jul 22, 2008 at 11:37 UTC |