PDLPorters / PDLPorters/SciPDL
Upgrade to cpanm
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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 —
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_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.gzworks as expected--no-deps/--notestare first-class optionscpanm AUTHOR/Dist-X.YZ.tar.gzcorrectly 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the build script and its install_local_tarballs function, then review the current curl, tar, Makefile.PL, make, and make test flow. Compare that flow with the proposed cpanm bootstrap and options. Done means the build uses cpanm for pinned local or archived modules without the existing manual installation glue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl, shell
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100