How to proxy a CPAN repo with Artifactory?

Local CPAN repositories are not currently supported in Artifactory (see RTFACT-6203). However, proxying a remote CPAN endpoint can work, if you want to use Artifactory as pure cache endpoint for CPAN installations. We have briefly tested Artifactory to work as a CPAN endpoint against http://www.cpan.org – 

User-added image

After creating the remote repository, configure the CPAN client to use http://<ARTIFACTORY_URL>/artifactory/<REMOTE_REPO_KEY>. You can do this by invoking the 'cpan' command and using 'o conf init' to start the setup dialog, which will allow you to set up Artifactory as a repository.
Or another possibility is to set the 'urllist' field in the "MyConfig.pm" file to point to remote repository configured in Artifactory.
 

The cached files will preserve the original structure of the source repository, so the next time you make a request, CPAN will be able to retrieve the requested package from the Artifactory cache, instead of the remote endpoint.