How to Manage CPAN Urllist

Advertisement

Advertisement

CPAN is a Perl tool for installing and managing modules. CPAN stands for the Comprehensive Perl Archive Network. There are many mirrors around the world that host the same CPAN archive. Sometimes mirrors shut down or you may want to add mirrors that are closer to you. These examples demonstrate how to add and remove mirrors from your configuration.

CPAN Shell

CPAN has an interactive shell. All of the commands provided below assume you are entering them from inside the CPAN shell. To launch the shell simply run

cpan

Finding Mirrors

First you need to find active mirrors. You can have more than one in case one fails. You can find a list of mirrors on the CPAN site.

Checking Current URL List

o conf urllist

Remove URL

Shift and pop will remove the last element on the bottom or the top of the list

o conf urllist pop

Or

o conf urllist shift

Add URL

o conf urllist push ftp://cpan.cs.utah.edu/CPAN/

Save Changes

o conf commit

Advertisement

Advertisement