If it is DNS connection problems, you can always try something along the lines of forcing /etc/hosts to be the first step and add cpan as a record in there. Other things that pop to mind are tunneling connections, perhaps use of outside public dns servers (these usually get blocked by firewalls fast with an apt sysadmin), downloading manually the pakcages then install locally...