In Devel::CoverReport::DB what does .12 and .13 format means?

134 Views Asked by At

I am generating coverage using "Devel::Cover" cpan module, which generates cover_db and has a runs subdirecoty inside. Inside run directory i am getting the file cover.14. How to get .12 or .13 format file and what does this .12, .13 or .14 format means ?? When i am generating html report of this file using cover_report of "Devel::CoverReport" module it is mentioned as per below subroutine of the module like it supports .12 and .13 format but i am getting .14 format

The below is the subroutine that is used in Devel::CoverReport::DB which shows .12 or .13 format.

read_db_file

Read and parse DB file, then return data structure as it is in the file.

By default, it assumes, that file is a storeble data dump. When storable fails, it will try to use JSON to load the data.

This method supports reading .12 and .13 file formats. It can auto-detect if it was serialized with storable or JSON.

If possible explain what this subroutine is means.

1

There are 1 best solutions below

0
On

The 12, 13 and 14 are the version numbers of the coverage DB. It looks like Devel::CoverReport is reading the DB directly rather than going through the Devel::Cover API.

So it seems that you won't be able to use this module until the author, or someone else, modifies it. The changes from v13 to v14 were minimal, so a fix to read the v14 DB files would probably not be too difficult. But the real fix is to use the Devel::Cover API so that things would still work when the DB moves to v15.