Dockerfile Setting perl lib directory for module installation via CPAN

I am trying to build a image which includes a bunch of perl modules. The first set requires to be installed in the global perl lib directory (using the line at cpan prompt o conf makepl_arg “”). The rest need to be installed with o conf makepl_arg “LIB=$LOOPER_HOME/libs PREFIX=$LOOPER_HOME”. How do I instruct in Dockerfile to change the perl lib directory for certain modules? I have a cpanfile and using “carton install” to install the modules. My Dockerfile has the following

RUN cpanm Carton \
 && carton install 

TIA
Ravi