I've started using Devel::Cover (excellent module!) to analyze my test suite. One thing I'm finding is that in the subroutine coverage analysis in most of my modules BEGIN gets included several times. I have some modules reporting 50% coverage testing when in actuality none of the functions are being run. It's just hitting BEGIN 3 times, none of the 3 functions, and reporting 50%. While I'm sure this is technically accurate, it's inflating my numbers and making the tests look better than they should. (I'm trying to make the case that we need to do more testing, so I don't want this. :-)
Two questions:
1. Why is BEGIN appearing numerous times? Because I'm using the module in several different places? Is there something with my code that I can do to mitigate having it show up so many times in the coverage analysis?
2. Is there any workaround I can use to filter BEGIN out entirely while I work on testing the remaining code? I have very few BEGIN blocks of interest and while I'd probably restore them to the list later, I don't want them there now.
Thanks for the module and any help you can provide.
Steve
(14)
]
