Looking back to 2018, what I learnt from XS and Dist::Zilla

Nicolas Rochelemagne was in town this month and presented some of the lessons he learned last year. He also gave some context, by covering some best of 2018 topics.

Travis CI

Nicolas started by talking about the Travis CI server. He has been using it to run tests on multiple Perl versions to verify modules he is working on. Travis is driven by a configuration in the file .travis.yml in a module's repository. In this configuration, you can exclude branches while you work on them, and only build the main branches. You can also set environment variables to drive particular behavior in the test. One powerful feature that Nicolas made use of was specifying the Perl versions he wanted to test. This allowed him to ensure that the modules under test continued to work on older Perls. There is also an ability to run a script for the build, which allows you to use arbitrary functionality for your test.

He did run into a problem with Dist::Zilla. It has a large dependency list that was installed for each test. Rather continue to running the tests incredibly slowly, he modified the dist.ini file to keep the Makefile.PL file around. That required copying the file out of the build directory after a build, and to commit that file as part of the change. It also meant that using the module did not require the use of dzil, you could install as a regular Perl module. This took the builds from 4 minutes per Perl version down to 30 seconds per.


Nicolas talked about 3 Dist::Zilla features that people may not be aware of.

Causes DistZilla to extract the README file from POD in modules.
Extract the synopsis code from the POD docs and execute it.
Copies example code from a specified file into the POD docs.

Best of 2018

Nicolas went over the NICEPERL list of modules chosen as the best of 2018.

  1. Mojolicious::Plugin::JSONAPI - Generates Rails-like routes.
  2. HTML:::Dom
  3. Dist::Zilla::Plugoing::ContriutorCovent
  4. Data::Password::zxcvbn - Dropbox's password strength estimator
  5. CPAN::Audit - audits for known vulnerabilities (kritika.io)
  6. Variable::Declaration - Declare with type constraints
  7. URI::Fast
  8. Mojolicious::Plugin::Status - Get a status UI for your servers
  9. Firefox::Marionette - Automate Firefox using the Marionette protocol
  10. Perl::LanguageServer

Some of the most voted distributions of the year:

XS Tricks

Nicolas showed a few XS tricks from some of the code he has been working on lately.

If you are going to work in XS, make certain that you are very familiar with C macros.

We had 6 people attending this month. As always, we'd like to thank cPanel, L.L.C. for providing the meeting space and food for the group.