I am using conda
where possible to install packages on Ubuntu and macOS. I keep packages in separate conda
environments, to better manage dependencies. How to install Perl plus common non-core Perl modules using conda
as much as possible? Obviously, I also need to use on top of conda
something like App::cpanminus
to install specific modules.
I have found this post: Using cpanm to Install Perl Modules in a Conda Environment by Yozen Hernandez (Jun 30, 2020). So far, the methods listed there appear to work, for example:
# install Perl and the module App::cpanminus:
conda create -c bioconda --name perl526 perl-app-cpanminus
source activate perl526
# install Regexp::Common Perl module:
env PERL5LIB="" PERL_LOCAL_LIB_ROOT="" PERL_MM_OPT="" PERL_MB_OPT="" cpanm Regexp::Common
source deactivate
Are there simpler or more robust solutions?
Notes:
I am aware that the conda
Perl is several versions behind the most recent Perl version, and that perl-app-cpanminus
is even more behind. For my applications, this is OK. I am creating bioinformatics workflows using Nextflow and Galaxy, where using conda
as much as possible offers many advantages. Hence, I can tolerate the somewhat old Perl versions.
I am aware of the directions on the main perl site, which refer to perlbrew, but I am interested in the conda
-based solutions.