The build script currently uses the classic cpan tool for installing CPAN modules, which has several well-known issues that have caused real pain during the v2.096+ work:
Problems with cpan
-
Aggressive prereq resolution — cpan doesn't recognise modules installed outside its own catalogue (e.g. via make install), so it can decide to "satisfy" a requirement by re-installing the latest version of a module we've carefully built ourselves. This caused PDL to be silently upgraded from 2.096 to 2.104 during the v2.096 build because PDL::GSL::SF listed PDL as a build prereq.
-
No support for local tarballs — cpan -i /path/to/file.tar.gz mangles the local path into a bogus CPAN URL (treating leading characters as the "author letter"), making it impossible to pin to a specific local file.
-
Default mirror (cpan.org) drops old versions — cpan -i ETJ/PDL-GSL-2.096.tar.gz 404s because cpan.org only keeps the latest version of each distro. The -M <mirror> flag is documented but broken in practice — does not reliably override the mirror.
-
Test environment quirks — cpan runs tests in ways that can deadlock on non-TTY environments (e.g. lib/perl5db.t from the Perl test suite when stdin/stdout are redirected).
Workaround currently in place
We worked around the issues by adding an install_local_tarballs shell function that does manual tar / perl Makefile.PL / make / make test / make install for the pinned PDL family modules, and curl-fetching them ourselves to a local directory. This works but adds ~20 lines of glue.
Proposed solution
Switch to cpanm (App::cpanminus). It handles all the above properly:
cpanm /path/to/local.tar.gz works as expected
--no-deps / --notest are first-class options
cpanm AUTHOR/Dist-X.YZ.tar.gz correctly fetches via the metacpan mirror that keeps old versions
- Doesn't mess with already-installed modules
Bootstrap is one line:
curl -L https://cpanmin.us | perl - App::cpanminus
The build script currently uses the classic
cpantool for installing CPAN modules, which has several well-known issues that have caused real pain during the v2.096+ work:Problems with
cpanAggressive prereq resolution —
cpandoesn't recognise modules installed outside its own catalogue (e.g. viamake install), so it can decide to "satisfy" a requirement by re-installing the latest version of a module we've carefully built ourselves. This caused PDL to be silently upgraded from 2.096 to 2.104 during the v2.096 build becausePDL::GSL::SFlisted PDL as a build prereq.No support for local tarballs —
cpan -i /path/to/file.tar.gzmangles the local path into a bogus CPAN URL (treating leading characters as the "author letter"), making it impossible to pin to a specific local file.Default mirror (
cpan.org) drops old versions —cpan -i ETJ/PDL-GSL-2.096.tar.gz404s because cpan.org only keeps the latest version of each distro. The-M <mirror>flag is documented but broken in practice — does not reliably override the mirror.Test environment quirks —
cpanruns tests in ways that can deadlock on non-TTY environments (e.g.lib/perl5db.tfrom the Perl test suite when stdin/stdout are redirected).Workaround currently in place
We worked around the issues by adding an
install_local_tarballsshell function that does manualtar / perl Makefile.PL / make / make test / make installfor the pinned PDL family modules, and curl-fetching them ourselves to a local directory. This works but adds ~20 lines of glue.Proposed solution
Switch to
cpanm(App::cpanminus). It handles all the above properly:cpanm /path/to/local.tar.gzworks as expected--no-deps/--notestare first-class optionscpanm AUTHOR/Dist-X.YZ.tar.gzcorrectly fetches via the metacpan mirror that keeps old versionsBootstrap is one line:
curl -L https://cpanmin.us | perl - App::cpanminus