Sometimes when you install a new perl version, you want to put all the modules you were using on a previous version onto your new perl install.
You can easily get the list of modules in the current perl installation with
perlbrew use perl-5.8.8@foo-project perlbrew list-modules
That simply prints out module names that you can use latter.
perlbrew 0.81, it is possible to use the
clone-modules command to reinstall all the modules from a Perl instance to another.
perlbrew clone-modules 5.26.1 5.27.7
will clone all modules from instance
5.26.1 to instance
perlbrew version prior to 0.81 or in case the
does not what you need, the following one liner can pipe all modules from one
instance of Perl to another one asking
cpanm to install each one on the latter:
perlbrew list-modules | perlbrew exec --with perl-5.16.2@foo-project cpanm
exec command is particularly helpful to run any program as if it is in the
environment of the specified perl installations.
Get more details running the
perlbrew help list-modules perlbrew help exec perlbrew help clone-modules