4

I have a carton cpanfile. on servers on which I have sudo, I would be happy to install the latest versions of my modules globally instead.

do I write a script that removes the 'requires' and uses cpan -i (although I am concerned that I may have too many to fit the command line limit), or is this functionality already somewhere else?

ivo Welch
  • 2,427
  • 2
  • 23
  • 31
  • 3
    If there is a cpanfile you can just run `cpanm --installdeps .` as root in the directory with the cpanfile and cpanm will read it and do the right thing. – simbabque Oct 11 '17 at 20:50

1 Answers1

3

If there is a cpanfile you can just run

$ cpanm --installdeps . 

as root (with sudo) in the directory with the cpanfile and cpanm will read it and install your dependencies to whatever Perl is configured for this cpanm.

You can ignore carton for that completely.

simbabque
  • 53,749
  • 8
  • 73
  • 136
  • Anyone switching from carton install to use this should note that carton install by default does not run the tests (--notest) so what used to be a clean install might suddenly not be so. https://github.com/perl-carton/carton/issues/159 https://github.com/perl-carton/carton/issues/205 – melutovich Feb 21 '22 at 22:22
  • My mention of "by default" is misleading as there is no option (yet) to run carton with tests https://github.com/perl-carton/carton/pull/145 – melutovich Feb 21 '22 at 22:34