til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as a developer

View project on GitHub

Use cpanm with carton

Sometimes a distribution might prove difficult to install using carton (via your cpanfile)

So if we have a cpanfile looking like the following:

requires 'Your::TroubleSome::Distribution';

And the installation will not go through using carton:

$ carton

You can use cpanm with the -l parameter:

$ cpanm -l local/ Your::TroubleSome::Distribution

Note that the -l parameter, just points to a directory and local/, is just the default installation point for carton.

This does hold a minor issue and that is that the cpanfile.snapshot is not updated as part of the carton run - do not dispair.

$ carton install

This additional step will update your cpanfile.snapshot accordingly and everything will be in sync.

Source: MetaCPAN