For anyone who's searching for this same answer in the future, another option can be found here in the documentation for cpanm
:
cpanm Plack@0.9990
If you have a long list of modules, consider feeding a cpanfile
into cpanm
rather than listing them all in the Dockerfile.
The easiest way to specify a particular version number for a module in a cpanfile
is like this:
requires 'Text::ParseWords', '==3.1';
The syntax for requesting the latest version of a module is this:
requires 'Text::ParseWords';
Requesting a minimum version: (note the lack of '==')
requires 'Text::ParseWords', '3.1';
The syntax for requesting specific versions in other ways is fairly well-documented here.
Another great write-up of the use of cpanm
and a cpanfile
can be found
in Installation of cpan modules by cpanm and cpanfile.