7

There's a lot of CPAN distributions in the Arch repositories, but not all of them. How should I handle a situation when I need a dist that is not already in the repos?

Should I use the cpan program then, or is there a better solution?

2 Answers 2

9

There are several methods described in the Arch wiki. The easiest version is probably to use perl-cpanplus-dist-arch, which, after installing and running the setup with setupdistarch can install perl modules as pacman packages with cpanp -i Your::Module::Name as described in its documentation.

2

Well, the best solution would probably be to create a distribution package for the CPAN package you want, contribute it to the Arch team, and maintain it (of course, the best solution for you would be for someone else to do this, :-) ). This way, everyone would benefit from it.

In reality, you're probably fine to just use CPAN directly to install it:

perl -MCPAN -e "install Package"

of course, the drawback here is that you don't get automatic updates when the upstream package changes. You'll need to keep track of the CPAN package yourself.

1
  • This would work until a new major version of Perl gets installed. When that happens the modules installed via cpan would not be loadable by Perl. Imagine if you installed all modules via cpan - you won't be even able to run Perl at all! Jul 7, 2017 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.