I have gotten so used to using super convenient the default setups on ubuntu for perl that other flavours of linux are feeling increasingly user-unfriendly. After I have been forced to switch to Angstrom on my Beaglebone Black, I have been trying to get it up like I usually like my Linux.
There are tons of things missing in stock Angstrom distribution of perl and it just doesn't do things right. So I decided to write a little guide on how to remove the existing perl distro and build a fresh version from the source:
$ opkg remove perl --force-depends --force-remove
$ wget http://www.cpan.org/src/5.0/perl-5.18.1.tar.gz
$ tar -xvf perl-5.18.1.tar.gz
$ cd perl-5.18.1
Update system time, Configure can cause problems if you don't do this step
$ date -s "7 DEC 2013 22:47:00"
$ ./Configure -d prefix=/usr/local/perl
Go get some cofffee, this will take a while.
Mix it up get some hot chocolate this time :)
$ make install
That will get you your usual cpan app on command line.
Now if you want to install cpanminus there are few more step than usual. Upgrade your wgt as Angstrom on BB ships with a version of wget older than what is supported by cpanminus.
Specifically the option --retry-connrefused used by cpanm is not supported by older versions of wget.
$ opkg wget
$ cpan App::cpanmius
This should get your cpanm working.