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

Is it bit-rot? Does no one care? (Sorry, that's inappropriate).

I spent a lot of time getting all the important and optional dependencies for CPAN.pm installed this evening, including CPAN::SQLite, and its dependency, DBD::SQLite which I had to grab an older release of to get it to compile, but that's another adventure ...).

Now nothing will be recognized as a distribution, and before that state, I saw the following error:

EDIT:

This obviously an error from an instance of cpanplus, I am apparently tired and confused.

[ERROR] Dir '' does not exist Key 'dir' () is of invalid type for 'CPANPLUS::Internals::Utils::_chdi +r' provided by CPANPLUS::Module::Signature::check_signature at /usr/l +ocal/share/perl/5.28.1/CPANPLUS/Module/Signature.pm line 61. [ERROR] Dir '' does not exist Key 'dir' () is of invalid type for 'CPANPLUS::Internals::Utils::_chdi +r' provided by CPANPLUS::Dist::_resolve_prereqs at /usr/local/share/p +erl/5.28.1/CPANPLUS/Dist.pm line 835. Running [/usr/bin/perl -MCPANPLUS::Internals::Utils::Autoflush /root/. +cpanplus/5.28.1/build/25tEDk2MKd/File-TreeBuilder-0.02/Makefile.PL].. +. [ERROR] Could not run '/usr/bin/perl Makefile.PL': -- cannot continue [ERROR] Dir '' does not exist Key 'dir' () is of invalid type for 'CPANPLUS::Internals::Utils::_chdi +r' provided by CPANPLUS::Dist::MM::prepare at /usr/local/share/perl/5 +.28.1/CPANPLUS/Dist/MM.pm line 441. [ERROR] Could not chdir back to start dir '' [ERROR] Unable to create a new distribution object for 'File::TreeBuil +der' -- cannot continue

The genuine cpan error

$ cpan install File::TreeBuilder CPAN: Term::ANSIColor loaded ok (v4.06) CPAN: CPAN::SQLite loaded ok (v0.220) CPAN: YAML::Syck loaded ok (v1.34) Reading 8 yaml files from /home/somian/.cpan/build/ DONE Restored the state of none (in 0.0359 secs) Database was generated on Sat, 21 Dec 2024 02:14:45 GMT Could not expand [File::TreeBuilder]. Check the module name.

I was working on a Debian system and I was hoping for ease and straightfowardness. Aaaaaugh. Back to using cpanplus

EDIT

(which is perfectly good) which is also broken.

Versions info:
perl (v5.28.1), i686-linux-gnu-thread-multi-64int
CPAN v1.64
Dec 21, 2024 at 03:49 UTC

A just machine to make big decisions
Programmed by fellows (and gals) with compassion and vision
We'll be clean when their work is done
We'll be eternally free yes and eternally young
Donald Fagen -> I.G.Y.
(Slightly modified for inclusiveness)

Replies are listed 'Best First'.
Re: My cpan is very broken
by Arunbear (Prior) on Dec 21, 2024 at 13:52 UTC
    Suggestion: try plenv - it makes it simple to install and use other Perls apart from the system Perl (this is generally much safer than tinkering with the system Perl).

    It is easy to install

    Once you've done that, you can use it to install cpan minus
    plenv install-cpanm
    Then
    % cpanm File::TreeBuilder --> Working on File::TreeBuilder Fetching http://www.cpan.org/authors/id/L/LU/LUCS/File-TreeBuilder-0.0 +2.tar.gz ... OK Configuring File-TreeBuilder-0.02 ... OK ==> Found dependencies: Test::Usage --> Working on Test::Usage Fetching http://www.cpan.org/authors/id/L/LU/LUCS/Test-Usage-0.08.tar. +gz ... OK Configuring Test-Usage-0.08 ... OK ==> Found dependencies: IO::Capture::Stderr, File::Slurp, IO::Capture: +:Stdout --> Working on IO::Capture::Stderr Fetching http://www.cpan.org/authors/id/R/RE/REYNOLDS/IO-Capture-0.05. +tar.gz ... OK Configuring IO-Capture-0.04 ... OK Building and testing IO-Capture-0.05 ... OK Successfully installed IO-Capture-0.05 --> Working on File::Slurp Fetching http://www.cpan.org/authors/id/C/CA/CAPOEIRAB/File-Slurp-9999 +.32.tar.gz ... OK Configuring File-Slurp-9999.32 ... OK Building and testing File-Slurp-9999.32 ... OK Successfully installed File-Slurp-9999.32 Building and testing Test-Usage-0.08 ... OK Successfully installed Test-Usage-0.08 Building and testing File-TreeBuilder-0.02 ... OK Successfully installed File-TreeBuilder-0.02 4 distributions installed
Re: My cpan is very broken
by soonix (Chancellor) on Dec 21, 2024 at 11:37 UTC
    Quick (and possibly stupid) question: ist that your system Perl? I'm currently on RedmondOS, so my paths look completely different anyway, but /usr/bin/perl and /usr/local/share/perl might belong to the system Perl.

    So, do you use local::lib or App::perlbrew, or in which way do you separate "your" modules from your system's?

      Yes, it is the vendor-provided package-manager Perl for Debian "Buster" in /usr/bin/perl. On this system I am not using local::lib or perlbrew. Thanks for your reply.

      Dec 21, 2024 at 20:37 UTC

      A just machine to make big decisions
      Programmed by fellows (and gals) with compassion and vision
      We'll be clean when their work is done
      We'll be eternally free yes and eternally young
      Donald Fagen -> I.G.Y.
      (Slightly modified for inclusiveness)