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

I'm following up to myself again. I haven't discovered exactly why this is happening but it has inflated greatly.

Prepending blib/arch and blib/lib of 28 build dirs to PERL5LIB, reaching size 4443; for 'get'
…
Prepending blib/arch and blib/lib of 28 build dirs to PERL5LIB, reaching size 4443; for 'prepare'
…
Prepending blib/arch and blib/lib of 28 build dirs to PERL5LIB, reaching size 4443; for 'make'
…
Prepending blib/arch and blib/lib of 28 build dirs to PERL5LIB, reaching size 4443; for 'test'

I'm doggedly determined to figure this out but others matters have intervened. I know more than a few people would say that the answer is use cpanm and it's not a bad answer; I have been using canpm some of the time. See my previous self-reply above for details on what I've looked at so far.

    – Soren
Feb 23, 2026 at 17:12 UTC

I anticipate that some readers will want the entire context. Here it is tucked into READMORE:

$ cpan cpan> test Sub::Exporter::Lexical CPAN: Term::ANSIColor loaded ok (v5.01) CPAN: HTTP::Tiny loaded ok (v0.092) CPAN: Net::SSLeay loaded ok (v1.94) CPAN: IO::Socket::SSL loaded ok (v2.098) Fetching with HTTP::Tiny: https://cpan.org/authors/01mailrc.txt.gz Reading 'C:/Users/somia/AppData/strawberry-perl-sourcecache/authors/01 +mailrc.txt.gz' CPAN: Compress::Zlib loaded ok (v2.213) CPAN: YAML::XS loaded ok (vv0.902.0) Reading 123 yaml files from /cygdrive/C/Users/somia/cygwin-perl-cpan/b +uild/ ..............................................................DONE Restored the state of 28 (in 1.5971 secs) ...................................................................... +......DONE Fetching with HTTP::Tiny: https://cpan.org/modules/02packages.details.txt.gz Reading 'C:/Users/somia/AppData/strawberry-perl-sourcecache/modules/02 +packages.details.txt.gz' Database was generated on Mon, 23 Feb 2026 09:53:03 GMT CPAN: HTTP::Date loaded ok (v6.06) ...................................................................... +......DONE Fetching with HTTP::Tiny: https://cpan.org/modules/03modlist.data.gz Reading 'C:/Users/somia/AppData/strawberry-perl-sourcecache/modules/03 +modlist.data.gz' DONE Running test for module 'Sub::Exporter::Lexical' CPAN: CPAN::Kwalify loaded ok (v5.50) Prepending blib/arch and blib/lib of 28 build dirs to PERL5LIB, reachi +ng size 4443; for 'get' Fetching with HTTP::Tiny: https://cpan.org/authors/id/R/RJ/RJBS/Sub-Exporter-Lexical-1.001.tar.g +z CPAN: Digest::SHA loaded ok (v6.04) Fetching with HTTP::Tiny: https://cpan.org/authors/id/R/RJ/RJBS/CHECKSUMS Checksum for C:/Users/somia/AppData/strawberry-perl-sourcecache/author +s/id/R/RJ/RJBS/Sub-Exporter-Lexical-1.001.tar.gz ok CPAN: Archive::Tar loaded ok (v3.04) Sub-Exporter-Lexical-1.001 Sub-Exporter-Lexical-1.001/README Sub-Exporter-Lexical-1.001/Changes Sub-Exporter-Lexical-1.001/LICENSE Sub-Exporter-Lexical-1.001/dist.ini Sub-Exporter-Lexical-1.001/META.yml Sub-Exporter-Lexical-1.001/MANIFEST Sub-Exporter-Lexical-1.001/t Sub-Exporter-Lexical-1.001/t/basic.t Sub-Exporter-Lexical-1.001/META.json Sub-Exporter-Lexical-1.001/snippet.pl Sub-Exporter-Lexical-1.001/Makefile.PL Sub-Exporter-Lexical-1.001/t/lib Sub-Exporter-Lexical-1.001/t/lib/TestExporter.pm Sub-Exporter-Lexical-1.001/t/00-report-prereqs.t Sub-Exporter-Lexical-1.001/xt/author Sub-Exporter-Lexical-1.001/xt/author/pod-syntax.t Sub-Exporter-Lexical-1.001/t/00-report-prereqs.dd Sub-Exporter-Lexical-1.001/xt/author/00-compile.t Sub-Exporter-Lexical-1.001/lib/Sub/Exporter Sub-Exporter-Lexical-1.001/lib/Sub/Exporter/Lexical.pm Sub-Exporter-Lexical-1.001/xt/release Sub-Exporter-Lexical-1.001/xt/release/changes_has_content.t Prepending blib/arch and blib/lib of 28 build dirs to PERL5LIB, reachi +ng size 4443; for 'prepare' CPAN: CPAN::Meta::Requirements loaded ok (v2.143) CPAN: Parse::CPAN::Meta loaded ok (v2.150010) CPAN: CPAN::Meta loaded ok (v2.150010) CPAN: Module::CoreList loaded ok (v5.20250820) Configuring R/RJ/RJBS/Sub-Exporter-Lexical-1.001.tar.gz with Makefile. +PL CPAN: CPAN::Reporter loaded ok (v1.2020) Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Sub::Exporter::Lexical Writing MYMETA.yml and MYMETA.json (/usr/bin/perl Makefile.PL exited with 0) CPAN::Reporter: Makefile.PL result is 'pass', No errors. RJBS/Sub-Exporter-Lexical-1.001.tar.gz /usr/bin/perl Makefile.PL -- OK Running make for R/RJ/RJBS/Sub-Exporter-Lexical-1.001.tar.gz Prepending blib/arch and blib/lib of 28 build dirs to PERL5LIB, reachi +ng size 4443; for 'make' cp lib/Sub/Exporter/Lexical.pm blib/lib/Sub/Exporter/Lexical.pm cp snippet.pl blib/lib/Sub/Exporter/snippet.pl Manifying 1 pod document (C:/ix/cygwin/bin/make exited with 0) CPAN::Reporter: make result is 'pass', No errors. RJBS/Sub-Exporter-Lexical-1.001.tar.gz C:/ix/cygwin/bin/make -- OK Prepending blib/arch and blib/lib of 28 build dirs to PERL5LIB, reachi +ng size 4443; for 'test' CPAN: CPAN::DistnameInfo loaded ok (v0.12) Running make test for RJBS/Sub-Exporter-Lexical-1.001.tar.gz PERL_DL_NONLAZY=1 "/usr/bin/perl.exe" "-MExtUtils::Command::MM" "-MTes +t::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'bl +ib/lib', 'blib/arch')" t/*.t # # Versions for all modules listed in MYMETA.json (including optional o +nes): # # === Configure Requires === # # Module Want Have # ------------------- ---- ---- # ExtUtils::MakeMaker 6.78 7.74 # # === Build Requires === # # Module Want Have # ------------------- ---- ---- # ExtUtils::MakeMaker any 7.74 # # === Test Requires === # # Module Want Have # ------------------- ---- -------- # ExtUtils::MakeMaker any 7.74 # File::Spec any 3.91 # Test::More 0.96 1.302219 # lib any 0.65 # strict any 1.13 # # === Test Recommends === # # Module Want Have # ---------- -------- -------- # CPAN::Meta 2.120900 2.150010 # # === Runtime Requires === # # Module Want Have # ------------- ----- -------- # Sub::Exporter 0.978 0.991 # perl 5.012 5.040003 # warnings any 1.70 # t/00-report-prereqs.t .. ok Built-in function 'builtin::export_lexically' is experimental at /cygd +rive/C/Users/somia/cygwin-perl-cpan/build/Sub-Exporter-Lexical-1.001- +0/blib/lib/Sub/Exporter/Lexical.pm line 134. t/basic.t .............. ok All tests successful. Files=2, Tests=4, 8 wallclock secs ( 0.11 usr 0.53 sys + 0.86 cusr + 6.84 csys = 8.34 CPU) Result: PASS (C:/ix/cygwin/bin/make test exited with 0) CPAN::Reporter: Test result is 'pass', All tests successful. CPAN::Reporter: preparing a CPAN Testers report for Sub-Exporter-Lexic +al-1.001 CPAN::Reporter: sending test report with 'pass' via Metabase No history written (no histfile specified). Lockfile removed. RJBS/Sub-Exporter-Lexical-1.001.tar.gz C:/ix/cygwin/bin/make test -- OK cpan>
  • Comment on Re: What is cpan (the installer) doing prepending all these directories to the PERL5LIB path?
  • Download Code

Replies are listed 'Best First'.
Re^2: What is cpan (the installer) doing prepending all these directories to the PERL5LIB path?
by choroba (Cardinal) on Feb 23, 2026 at 17:48 UTC
    See is_tested:

    is_tested
    List all build directories of distributions that have been tested successfully but have not yet been installed. See also install_tested.

    So it seems you are testing modules without installing them.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      It's the modules that were tested but not installed during a session. At least according to my testing, the list isn't persistent. Exiting the shell resets the list. This also means it doesn't apply to cpan -t MODULE