in reply to What is cpan (the installer) doing prepending all these directories to the PERL5LIB path?

but they seem to be hanging around long after they are necessary.

That's impossible. A program can't change the environment of another process. It can change its own, and it can set the starting environment of its children. That's it. That means that the cpan process can't modify your shell's environment.

If you're trying to explain env var found in your shell, start by checking your shell's login and startup scripts (e.g. .profile, .bash_profile, .bashrc).

  • Comment on Re: What is cpan (the installer) doing prepending all these directories to the PERL5LIB path?
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: What is cpan (the installer) doing prepending all these directories to the PERL5LIB path?
by ysth (Canon) on Nov 12, 2025 at 15:00 UTC
    He's not saying anything like that. When he's doing an install it is letting him know it is adding other builds to PERL5LIB for that install, and the number is increasing, not that that env var is somehow persisting.

      That's right, ysth. I do understand how env works for the currently-running process, its child processes, its parent process, and so on, ikegami.

      Unrelated to the reported behavior is a spurious error message I'm seeing:

      prerequisite moduleFile::Basename not known
      

      This message also started appearing rather recently and doesn't seem to be connected to any actual failure in cpan. I thought I'd mention it here since it's a "while we're discussing cpan" kind of thing.

          — Soren

      Nov 14, 2025 at 19:44 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)

        So what do you claim is sticking around?