How do I install CPAN modules while using perlbrew?

After installing perlbrew you could install cpanm through this command:

perlbrew install-cpanm

Otherwise you will need to install cpanm manually each time you switch your Perl version on perlbrew. With this command just once.

Once installed you can then use cpanm to install the missing module:

cpanm File::Copy::Recursive

Leave a Comment