<p>What do I need to set up and maintain a local CPAN mirror? What scripts and best practices should I be aware of?</p>

[{'answer_id': 77722, 'author': 'mopoke', 'author_id': 14054, 'author_profile': 'https://Stackoverflow.com/users/14054', 'pm_score': 2, 'selected': False, 'text': '<p>Try <a href="http://search.cpan.org/perldoc/CPAN::Mini" rel="nofollow noreferrer">CPAN::Mini</a>.</p>\n'}, {'answer_id': 77840, 'author': 'xdg', 'author_id': 11800, 'author_profile': 'https://Stackoverflow.com/users/11800', 'pm_score': 5, 'selected': False, 'text': '<p><a href="http://search.cpan.org/perldoc?CPAN::Mini" rel="noreferrer">CPAN::Mini</a> is the way to go.  Once you\'ve mirrored CPAN locally, you\'ll want to set your mirror URL in CPAN.pm or CPANPLUS to the local directory using a "file:" URL like this:</p>\n\n<pre><code>file:///path/to/my/cpan/mirror\n</code></pre>\n\n<p>If you\'d like your mirror to have copies of development versions of CPAN distribution, you can use <a href="http://search.cpan.org/perldoc?CPAN::Mini::Devel" rel="noreferrer">CPAN::Mini::Devel</a>.</p>\n\n<p>Update: </p>\n\n<p>The <a href="http://www.cpan.org/misc/cpan-faq.html#How_mirror_CPAN" rel="noreferrer">"What do I need to mirror CPAN?"</a> FAQ given in another answer is for mirroring <em>all</em> of CPAN, usually to provide another public mirror.  That includes old, outdated versions of distributions.  CPAN::Mini just mirrors the latest versions. This is much smaller and for most users is generally what people would use for local or disconnected (laptop) access to CPAN.</p>\n'}, {'answer_id': 78078, 'author': 'moritz', 'author_id': 14132, 'author_profile': 'https://Stackoverflow.com/users/14132', 'pm_score': 3, 'selected': False, 'text': '<p>CPAN::Mini is fine. By default it keeps only the latest version of a distribution, not every version as CPAN does.</p>\n\n<p>You can also install CPAN::Mini::Webserver, which provides you with a web interface to your local cpan mirror - very handy if you are offline and still want to work with perl.</p>\n'}, {'answer_id': 82989, 'author': 'Jon Topper', 'author_id': 6945, 'author_profile': 'https://Stackoverflow.com/users/6945', 'pm_score': 2, 'selected': False, 'text': "<p>The most likely scenario for running a CPAN mirror is so that your network of 50 machines can all be updated from it locally, instead of hitting the network 50 times.</p>\n\n<p>I'd argue that using CPAN in the traditional manner is a poor way to keep a network of servers up to date.</p>\n\n<p>I run a network of RedHat machines.  I package all CPAN modules intended for use in production into RPMs (mostly using the cpanflute2 tool from RPM::Specfile) and deploy them that way, thereby ensuring proper dependency tracking which you don't really get from CPAN itself in any sane way.</p>\n"}, {'answer_id': 109447, 'author': 'brian d foy', 'author_id': 2766176, 'author_profile': 'https://Stackoverflow.com/users/2766176', 'pm_score': 3, 'selected': False, 'text': '<p>Besides the other answers, check out Leon\'s <a href="http://search.cpan.org/dist/CPAN-Mini-Webserver" rel="nofollow noreferrer">CPAN::Mini::Webserver</a>, which gives you a <a href="http://search.cpan.org" rel="nofollow noreferrer">CPAN Search</a> interface to your local CPAN copy.</p>\n\n<p>If you want to do more fancy things, see my <A href="http://www.slideshare.net/brian_d_foy/mycpan-lapm-september-2007" rel="nofollow noreferrer">"MyCPAN"</a> talk. You can inject your own private modules into your private CPAN with <a href="http://search.cpan.org/dist/CPAN-Mini-Inject" rel="nofollow noreferrer">CPAN::Mini::Inject</a>, for instance.</p>\n'}]
['https://Stackoverflow.com/questions/77695', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9532/']