Utilizing Vagrant for the CPAN Pull Request Challenge
I’ve been participating in the CPAN pull request challenge in the Perl community this year and it’s been a great learning experience. I’ve learned about Dist::Zilla, Travis CI and Perlbrew. This month, I’ve been working on html-scrubber, and the Dist::Zilla plugins are giving my windows 8 box a headache so I decided to use Vagrant to spinup a Ubuntu box. Travis uses perlbrew to install a new perl, run the build and tests so why shouldn’t I?
I installed HyperV VirtualBox, initialized a new ubuntu/trusty64 box (vagrant init ubuntu/trusty64, vagrant up), and then fired up Perl. It was set to version 5.14. So here’s what I had to do to get up and running:
- Update Apt-Get
 - Install git (
sudo apt-get install git) and dependencies - Install libssl headers & includes (
sudo apt-get install libssl-dev) (for Dist::Zilla deps) - Install perlbrew (
sudo apt-get install perlbrew) - Use perlbrew to install Perl 5.20, and “use” it
 perlbrew initperlbrew install stableperlbrew use perl-5.20.2- Install CpanMinus
 perlbrew install-cpanm- Create a library home for new repos to sandbox things and use it
 perlbrew lib create mrcperlbrew use perl-5.20.2@mrcexport PATH=$PATH:$PERLBREW_PATH(needed to include the bin fordzil)- Install Dist::Zilla
 cpanm -n Dist::Zilla
Update
After some frustration with Hyper-V and proxy, I decided to go back to VirtualBox. I was having some issues getting through my CNTLM proxy still. I had to setup an additional private NIC and then setup a firewall rule to allow the VM to connect to my CNTLM proxy. Still wasn’t working. Then I discovered that I had to turn on the -g (gateway) option in CNTLM, allowing it to be accessed from ...:3128, not just the loopback device. That worked! Now I’m back up (with VirtualBox), proxy-enabled and sharing folders.