"be consistent" | |
PerlMonks |
A cpanfile polyglot - for setting up Perl on Termuxby Corion (Patriarch) |
on Dec 05, 2024 at 18:59 UTC ( [id://11163045]=perlmeditation: print w/replies, xml ) | Need Help?? |
Recently I got myself a new phone. And, as one does, I installed Termux on it, to have a unix-ish environment for when I need it. Then, of course, I went to configure Perl and install some modules I'd like there. As this was not my first time doing so, I thought about listing all the modules I want in a cpanfile and then using App::cpanminus to install these, making the process far more reproducible. But that required some non-Perl prerequisites, like the C compiler, make and perl itself. And of course, also bootstrapping App::cpanminus. Then I thought a bit on how to combine this setup into a single file. This is what I came up with. It's a cpanfile that doubles as shell script.
Why not the other way around? Because I could not find a way to make cpanm take a file with a different name than cpanfile :) The cpanfile is also available on Github, if you want to copy it.
Back to
Meditations
|
|