Last month the development team here at CV-Library embarked on the CPAN Pull Request Challenge and this month we tackled our second module: Git::Hooks.

Members of our development, QA, operations and support teams participated, staying after work and creating four different pull requests.

February Pull Requests

The first pull request to hit GitHub was a change from the authors to-do list; which was to use the Test::Requires::Git module in the test suite. Using this module allowed us to simplify the test code from:

 SKIP: {

try {
$repo->command(['check-mailmap' => '<>'], {STDERR => 0});
} otherwise {
skip "test because the command git-check-mailmap wasn't found", 4;


test_requires_git skip => 4, version_ge => '';

Next we added some small changes to the main POD, to make finding the tutorial and to-do lists easier to find. This was done as at first we totally missed the to-do list (until the author (Gustavo) emailed us telling us about the TODO file). This commit was done with a perl developer and one of our non-developers which was a great introduction to POD.

The third pull request was adding a Travis configuration to automate the testing of changes pushed to GitHub. This module uses Dist::Zilla so it was a different flow to last month’s module and a great opportunity to introduce some people to dzil commands and how they are used by module authors.

sudo: required
language: "perl"
- '5.24'
- '5.22'
- '5.10'
- "linux"
- sudo apt-get install libaspell-dev
- cpanm Text::Aspell
- cpanm --quiet --notest --skip-satisfied Dist::Zilla
- "dzil authordeps --missing | grep -vP '[^\\w:]' | xargs -n 5 -P 10 cpanm --quiet --notest"
- "dzil listdeps --author --missing | grep -vP '[^\\w:]' | cpanm --verbose"
- dzil smoke --release --author

Finally, we took another item from the module author’s to-do list and converted a script containing subs used in tests, to be a module. This meant turning the script into a module and rather than “requiring” the file we “include” it. So each of the test files needed a change like this:

-BEGIN { require "" };
+use Git::Hooks::Test qw/:all/;

One commit worked on (but that didn’t make it to fruition as a pull request) was the to-do item for Windows support. This was really interesting as we were fortunate to have our desktop support manager attend, who supports CV-Library’s desktop environment which outside of the development team is primarily Windows.

Unlike last month, we did a bit of “sprint planning” in advance. We even had a burndown chart of pull requests to pizza slices consumed :-)

Pizza to Pull Request Burndown Chart

The process of working on the challenge brought to light new ideas both for the veterans in our team and the new members. Only a subset of our team currently have modules on CPAN, so encountering Dist::Zilla was really educational for some of the team and the work on porting the script to a module was really informative. The group of people working on the Travis configuration were very pleased that the process was comparatively easy compared to the dependency problems we encountered last month. After getting it working, we were able to expand it to use Dist::Zilla as which means that the author has all the dzil tests automated now.

Now the team has to wait for a couple of weeks before the next module is announced; we have provisionally scheduled in March 15th for the next evening event, so expect a blog post shortly after that date.

We were really pleased when Gustavo looked at our pull requests and has now accepted them all, with some really great comments. Thanks Gustavo!