Search Icon, Magnifying Glass

Graduation Cap Heart Question Mark Magnifying Glass

My WSL Perl Development Environment

Recently I bought a little Windows tablet on sale for $60 as a device to play around with Windows 10 on and for — hopefully — testing a future UWP or PWA Windows version of LectServe. I’ll give a review of the NuVision tablet at some point in the future, but after I spent two! days getting Windows updated to the newest release, I quickly enabled the Windows subsystem for Linux and installed Debian.

As I am want to do to anything that presents me a Bash shell, I started down the path of compiling the latest stable Perl and getting a development environment setup for my CPAN modules. The last time I had used the WSL shortly after its release, I ran into numerous problems getting Perl to compile. This time, however, installing the build-essential package and maybe curl — I honestly can’t remember — was all I needed for Perlbrew to do its thing.

Because I’m a good CPAN Testers citizen and enjoy the danger/pain of continually updating modules, the utilities cpan-outdated and cpanm-reporter are an essential part of my development environment. I’ve had issues with the SSL portion of cpanm-reporter on actual Linuxes in the past, but I was pleasantly surprised on WSL. I needed a few C headers installed, but otherwise, it was a sinch. IO::Socket::SSL fails nine tests in WSL that I can’t be bothered to investigate, so I just installed with a --notest flag to look past the fails.

I’m happy to report the below commands should get Perl up and running on your WSL Debian environment. All of my modules build and run in Perl 5.26.1 with all of their dependencies without a hitch.

sudo apt-get install build-essential curl vim libz-dev libssl libssl-dev libxml2 libxml2-dev -y
\curl -L | bash
perlbrew install stable --thread --notest --switch
cpanm IO::Socket::SSL --notest
cpanm App::cpanoutdated App::cpanminus::reporter
perlbrew clean