I'm trying to install quite a few modules from CPAN into a temporary directory.
This is purely to place quite a few of them into a directory that I can then create a custom RPM out of. The rpm will then later be used on new installs as a bootstrap type thing on top of a custom perl install. They won't be run from this temporary location.
In CPAN I have tried
o conf mbuildpl_arg "--install_base /tmp/perl"
o conf makepl_arg "PREFIX=/tmp/perl"
But this seems to install them into /root/.cpan/build/somename/tmp/perl (where 'somename' varies each time), or the usual location. I was hoping to capture them all into a temporary buildroot type folder, that I can rpm them into the correct folder later.
Is there any way to do this, or am I doing something that isn't a good idea ?
I've looked into fpm and cpan2rpm but couldn't see a way to do lots of Perl modules into one RPM, so happy for any better thoughts on how to go from lots of modules to one custom RPM.