in reply to How to run Devel::Cover if we don't have a makefile?

I tend to use what you've already tried:

HARNESS_PERL_SWITCHES=-MDevel::Cover prove -lv t/basic.t

Devel::Cover can cause otherwise well-behaved code to segfault occasionally. There's at least two issues in its issue tracker related to segfaults. Having skimmed your code, I don't think you're triggering either of those two, but I am pretty sure there are other unreported potential segfaults lurking in Devel::Cover.