OS X Homebrew and Readline GNU
From https://coderwall.com/p/kk0hqw/perl-install-term-readline-gnu-on-osx, a slight tweak:
Assuming, homebrew is installed, first do:
brew install readline
cpan Term::ReadLine
cpan
Now comes the tricky part. Inside the cpan shell:
look Term::ReadLine::Gnu
ARCHFLAGS='-arch x86_64' 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