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

I am in search more for wisdom, rather than technical expertise; I think. But I know the answer is here....

The dilemma, is creating an offline CPAN archive. The solution was found here, and I tracked down the script, read the docs, and tried the script. it failed to run; the specifics are further down.

I fear installing 5.10, and putting at jeopardy, 15(?) years of Perl scripts. Some of which took many days of crafting to get one technique to work (and the considerable expertise I needed from the monks present here). Are there any words of guidance and caution about the transition from 8 to 10 to be found in the myriad manuscripts here in the monastery library???

Results follow:

Use of uninitialized value in concatenation (.) or string at /usr/loca +l/share/perl/5.8.8/Scalar/Util.pm line 30. is only avaliable with the XS version at /usr/local/share/perl/5.8.8/ +Exporter/Heavy.pm line 178 BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/Compr +ess/Zlib.pm line 9. Compilation failed in require at ./fetchCPAN.pl line 31.
As it turns out, my Perl install needed a number of upgrades; with a attempted to fix with cpan[1]> upgrade.

But, after running "upgrade", the code still fails to run with the same errors!! There are parts that I will never be able to upgrade!! This is because the upgrades exist in 5.10, and not 5.8. After running "upgrade" 3 times (with the same result) I 'grep'ed the result and found this plus more (messed up with special characters). The first is the full message, the others are the 1st line from like entries

Running install for module 'B' The most recent version "1.17" of the module "B" is part of the perl-5.10.0 distribution. To install that, you need to +run force install B --or-- install R/RG/RGARCIA/perl-5.10.0.tar.gz ----ditto-- The most recent version "0.02" of the module "DBM_Filter" The most recent version "0.02" of the module "less" The most recent version "0.04" of the module "PerlIO::via" The most recent version "0.05" of the module "PerlIO::scalar" The most recent version "0.07" of the module "Hash::Util" The most recent version "0.08" of the module "attributes" The most recent version "0.08" of the module "re" The most recent version "0.10" of the module "PerlIO::encoding" The most recent version "0.12" of the module "XS::APItest" The most recent version "0.25" of the module "Unicode::UCD" The most recent version "0.74" of the module "B::Concise" The most recent version "0.83" of the module "B::Deparse" The most recent version "1.01" of the module "DirHandle" The most recent version "1.02" of the module "filetest" The most recent version "1.03" of the module "bytes" The most recent version "1.03" of the module "Term::ReadLine" The most recent version "1.03" of the module "Time::gmtime" The most recent version "1.04" of the module "English" The most recent version "1.04" of the module "sigtrap" The most recent version "1.04" of the module "strict" The most recent version "1.04" of the module "UNIVERSAL" The most recent version "1.05" of the module "B::Terse" The most recent version "1.05" of the module "Fatal" The most recent version "1.06" of the module "autouse" The most recent version "1.06" of the module "charnames" The most recent version "1.06" of the module "Fcntl" The most recent version "1.06" of the module "File::Glob" The most recent version "1.06" of the module "open" The most recent version "1.06" of the module "overload" The most recent version "1.06" of the module "SDBM_File" The most recent version "1.06" of the module "warnings" The most recent version "1.07" of the module "FileCache" The most recent version "1.07" of the module "NDBM_File" The most recent version "1.07" of the module "ODBM_File" The most recent version "1.07" of the module "utf8" The most recent version "1.08" of the module "Carp" The most recent version "1.08" of the module "Pod::Html" The most recent version "1.1005" of the module "File::Compare" The most recent version "1.11" of the module "Opcode" The most recent version "1.12" of the module "File::Find" The most recent version "1.13" of the module "POSIX" The most recent version "1.17" of the module "B" The most recent version "1.17" of the module "diagnostics" The most recent version "1.1" of the module "Benchmark" The most recent version "1.1" of the module "Tie::Memoize" The most recent version "1.49" of the module "FindBin" The most recent version "1.80" of the module "Socket" The most recent version "2.01" of the module "sort" The most recent version "2.11" of the module "File::Copy" The most recent version "2.76" of the module "File::Basename" The most recent version "3.02" of the module "Thread" The most recent version "3.26" of the module "Text::ParseWords"

Replies are listed 'Best First'.
Re: Being forced to 5.10??
by jethro (Monsignor) on Jul 04, 2008 at 16:26 UTC
    Judging from comments here on perlmonks and my own experience there are no problems with using more than one version of perl concurrently. You could install perl10 in /usr/local, change the name of the executable to perl5.10, add /usr/local/bin to (the end of) your PATH environment variable and /usr/local/lib/perl5 to your PERL5LIB env variable. Any script you want to use with perl5.10 now only needs a short edit of its shebang line and you're done

Re: Being forced to 5.10??
by pc88mxer (Vicar) on Jul 04, 2008 at 16:07 UTC
    This thread: "Can't happen" bugs discusses the exact same problem. It's a long thread, but the resolution seems to be to downgrade to version 1.42 of Compress::Zlib.

    Alternatively, try installing the XS version of Scalar::Util.

    Update: you can force the XS version to be built by using perl Makefile.PL -xs when building the distribution Scalar-List-Utils. However, it looks like the XS version should automatically be selected if your perl has access to a C compiler.

Re: Being forced to 5.10??
by ysth (Canon) on Jul 04, 2008 at 18:24 UTC
    The dilemma, is creating an offline CPAN archive. The solution was found here, and I tracked down the script, read the docs, and tried the script. it failed to run; the specifics are further down.
    Is this script the fetchCPAN.pl you mention? Where did it come from? Have you considered CPAN::Mini instead?

    Do I understand correctly that you are considering upgrading to 5.10, or using the cpan upgrade command, just to get the script to run to create a local copy of CPAN? This seems backwards, somehow.

      The script is probably the foundation script for the CPAN::Mini. I found the link in a Monks thread.

      The 3 mirror_update arguments are the same names as the ones from the script I found.

      Status -- I tried the script on another machine and it ran without a problem. I think the difference is in how the Perl on each machine is maintained. While both machines are Debian, the second machine is a Knoppix install which came packaged on a CD. I update that Perl exclusively with CPAN. The first machine was an expiment to do a stock Debian Etch install, and use the automated updater to locate and install recent changes. In that case, the Perl may have been a cobble of APT packages and CPAN downloads. I think that may have been the problem

      I will now have to take some time to work through the manual solutions presented, to put things straight. I have not looked into Debians packages for Perl packaging, because CPAN is just so sweet, when it comes to dependencies and all....