How to Manage CPAN Urllist

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


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


o conf urllist shift


o conf urllist push

Save Changes

o conf commit