Perl: Instalar Term :: ReadLine :: Gnu no OSX

Supondo que o homebrew esteja instalado, primeiro faça:

brew install readline
cpan
Term::ReadLine
cpan

Agora vem a parte complicada. Dentro do shell cpan:

look Term::ReadLine::Gnu
perl
Makefile.PL --includedir=$(brew info readline|egrep '[[:digit:]]+ files,'|awk '{print $1}')/include/ --libdir=$(brew info readline|egrep '[[:digit:]]+ files,'|awk '{print $1}')/lib/
make install

^D # to quit sub-shell
quit

Feito.

Eu sugiro usar o perlbrew também.