Answering questions about CPAN that nobody asked ... the sequel βοΈ
Toolchain abundance
Acme::Both::MakefilePL::And::BuildPL ```text ----Acme::Both::MakefilePL::And::BuildPL--- | | | | | Makefile.PL Build.PL | | | | | ------------------------------------------- ```
cpanm runs Build.PL ```text [1|3] $ cpanm Acme::Both::MakefilePL::And::BuildPL Configuring Acme-Both-MakefilePL-And-BuildPL-0.03 Running Build.PL -> OK ```
cpm runs Build.PL ```text [1|3] $ cpm install Acme::Both::MakefilePL::And::BuildPL Configuring distribution Executing /usr/bin/perl Build.PL Created MYMETA.yml and MYMETA.json ```
Toolchain scarcity
Acme::No::MakefilePL::No::BuildPL
cpanm breaks ```text [1|4] $ cpanm Acme::No::MakefilePL::No::BuildPL@0.01 Configuring Acme-No-MakefilePL-No-BuildPL-0.01 -> N/A -> FAIL The distribution doesn't have a proper Makefile.PL/Build.PL ```
cpm breaks ```text [1|3] $ cpm install Acme::Both::MakefilePL::And::BuildPL@0.01 Configuring distribution Failed to configure distribution ```
Static install (in META.*) to the rescue ```text [4] name: Acme-No-MakefilePL-No-BuildPL version: 0.03 ... x_static_install: 1 ```
cpm is happy ```text [1|4,9] $ cpm install Acme::No::MakefilePL::No::BuildPL --verbose DONE resolve (0.149sec) Acme::No::MakefilePL::No::BuildPL -> Acme-No-MakefilePL-No-BuildPL-0.03 (from MetaDB) DONE fetch (0.167sec) Acme-No-MakefilePL-No-BuildPL-0.03 DONE configure (0.003sec) Acme-No-MakefilePL-No-BuildPL-0.03 DONE resolve (0.019sec) Acme::Prereq::None -> Acme-Prereq-None-0.01 (from MetaDB) DONE fetch (0.049sec) Acme-Prereq-None-0.01 DONE configure (0.092sec) Acme-Prereq-None-0.01 DONE install (0.181sec) Acme-Prereq-None-0.01 DONE install (0.034sec) Acme-No-MakefilePL-No-BuildPL-0.03 2 distributions installed. ```
cpanm breaks ```text [1|5] $ cpanm Acme::No::MakefilePL::No::BuildPL --> Working on Acme::No::MakefilePL::No::BuildPL Fetching http://www.cpan.org/authors/id/C/CO/CONTRA/Acme-No-MakefilePL-No-BuildPL-0.03.tar.gz ... OK Configuring Acme-No-MakefilePL-No-BuildPL-0.03 ... N/A ! The distribution doesn't have a proper Makefile.PL/Build.PL ``` (but is not supposed to)
Metadatas scarcity
Acme::No::META
No problem for cpanm ```text [1|7] $ cpanm Acme::No::META --> Working on Acme::No::META Fetching http://cpan.metacpan.org/authors/id/C/CO/CONTRA/Acme-No-META-0.01.tar.gz ... OK Configuring Acme-No-META-0.01 ... OK Building and testing Acme-No-META-0.01 ... OK Successfully reinstalled Acme-No-META-0.01 1 distribution installed ```
No problem for cpm ```text [1|3] $ cpm install Acme::No::META DONE install Acme-No-META-0.01 1 distribution installed. ```
Except if source is a git URL! ```text [1|4] $ cpm install https://github.com/thibaultduponchelle/Acme-No-META.git Cloning https://github.com/thibaultduponchelle/Acme-No-META.git -> OK Distribution does not have META.json nor META.yml Failed to fetch/configure distribution ```
This is known and "by design"
([#10](https://github.com/skaji/cpm/issues/210), [#250](https://github.com/skaji/cpm/pull/250))
Also in 2025, it's not allowed anymore (not indexed)
A bit of privacy please
"By convention, the top-level Local namespace should never conflict with anything on CPAN. This allows you to be confident that the name you choose under Local isn't going to conflict with anything from the outside world."
But [Local::Acme](https://metacpan.org/pod/Local::Acme) is indexable
And installable ```text [1|3] $ cpm install Local::Acme DONE install Local-Acme-0.01 1 distribution installed. ```
[CPAN::Namespace::Check::Visibility](https://metacpan.org/pod/CPAN::Namespace::Check::Visibility) to the rescue
(but only an "a posteriori" monitoring)
Navigating at border of the index
Acme::Not::Indexed
Transparently installed by cpm ```text [1|6] $ cpm install Acme::Not::Indexed --verbose DONE resolve (0.518sec) Acme::Not::Indexed -> Acme-Not-Indexed-0.01 (from MetaCPAN) DONE fetch (0.149sec) Acme-Not-Indexed-0.01 DONE configure (0.089sec) Acme-Not-Indexed-0.01 DONE install (0.200sec) Acme-Not-Indexed-0.01 1 distribution installed. ```
(Almost) transparently installed by cpanm ```text [1|2|8] $ cpanm Acme::Not::Indexed ! Finding Acme::Not::Indexed on cpanmetadb failed. --> Working on Acme::Not::Indexed Fetching http://cpan.metacpan.org/authors/id/C/CO/CONTRA/Acme-Not-Indexed-0.01.tar.gz ... OK Configuring Acme-Not-Indexed-0.01 ... OK Building and testing Acme-Not-Indexed-0.01 ... OK Successfully installed Acme-Not-Indexed-0.01 1 distribution installed ```
Not status "latest" but "cpan" in MetaCPAN fastapi
Somewhat like a TRIAL
MetaCPAN Index is a bit *too nice*? π«Ά Or cpanm/cpm in their way of querying it? π€
Uploading again and again the same version
Common belief: It's not possible
(even miyagawa is confused!) ([#683](https://github.com/miyagawa/cpanminus/pull/683))
*It's impossible to upload the same *distribution* (tarball)
But look at Acme::Version::Same
Overwrite 0.01 with patched version
"patched" in 02packages
And in FastAPI MetaCPAN
And MetaDB "package" endpoint as well:
And MetaDB endpoint "history"
This last one leads to an annoying "freshness" decision problem (when pinning)
cpm installs latest "-patched" ```text [1|2] $ cpm install Acme::Version::Same@0.01 --verbose DONE resolve (0.115sec) Acme::Version::Same -> Acme-Version-Same-0.01-patched (from MetaDB) DONE fetch (0.198sec) Acme-Version-Same-0.01-patched DONE configure (0.087sec) Acme-Version-Same-0.01-patched DONE install (0.178sec) Acme-Version-Same-0.01-patched 1 distribution installed. ``` ([#255](https://github.com/skaji/cpm/pull/255))
cpanm installs wrong one ```text [1|3] $ cpanm Acme::Version::Same@0.01 --force --> Working on Acme::Version::Same Fetching http://backpan.perl.org/authors/id/C/CO/CONTRA/Acme-Version-Same-0.01.tar.gz ... OK Configuring Acme-Version-Same-0.01 ... OK Building and testing Acme-Version-Same-0.01 ... OK Successfully reinstalled Acme-Version-Same-0.01 1 distribution installed ``` ([#683](https://github.com/miyagawa/cpanminus/pull/683))
(resolver MetaDB) πΆβπ«οΈ
It exists in the wild, e.g. [Pod::Simple::HTMLLegacy]( https://cpanmetadb.plackperl.org/v1.0/history/Pod::Simple::HTMLLegacy)
(from core Pod::Simple)
Probably relatively common for "non lead modules"
"The version number for a package must be non-decreasing" (PAUSE Operating Model 3.5)
Extra bits
Non lead module indexing failures is not fatal
"If an error (in PAUSE) happens during indexing, then one or more packages in a distribution may end up not being indexed" (PAUSE Operating Model 3.5)
It implies: - Other modules and distribution are well indexed - A bit error-prone (overwrite a .pm at install)
Extra extra bits
CPAN::Test::Dummy::*
(MIYAGAWA)
Extra extra extra bits
Possible industrialization with [Data::Fake::CPAN](https://metacpan.org/pod/Data::Fake::CPAN) (RJBS) π€© + [CPAN::Uploader](https://metacpan.org/pod/CPAN::Uploader) (RJBS) π + Containerized PAUSE (CONTRA) π
This is the end of our second tour of CPAN oddities π€
Thank you!