Using an older version of Devel::Cover to test v5.8

I’ve had a problem with automated coverage testing and v5.8 (the oldest Perl that I support). Devel::Cover made some changes after 1.23 so that it doesn’t guarantee support for v5.8 and earlier. It might work but you’re lucky if it is.

I have some projects where I want to support v5.8. I tend to support as far back as I can unless I have a good reason not to. A good reason is typically that I want to use a feature from v5.14 or later. A bad reason is updating stuff to kill off v5.8.

cpanm has a feature to install a particular version of a module. I can use a Devel::Cover that supports v5.8. Earlier I showed my Travis config. I made a small adjustment to install a version that I want:

install:
    - cpanm --quiet --installdeps --notest .
    - cpanm --quiet --notest Devel::[email protected]
    - cpanm --quiet --notest Devel::Cover::Report::Coveralls

I don’t intend this to be permanent. Eventually I’ll need to update Devel::Cover but this stopgap gives me a little bit of time.