On Wed, Jul 22, 2015 at 08:17:18PM +0530, Piyush Verma wrote:
> Thanks Paul, this solved me some part of problem. I was using Devel::Cover
> in wrong place of .pl file.
> Now putting this on start of .pl script works for me but not completely.
> 
> There are 20 .pm modules present in my project directory but in coverage
> report I am able to see only 6 .pm modules.
> I think for such input it is calling code from those 6 files. Do we have
> such option so that I get coverage of all 20 files in report, doesn't
> matter code has been called or not?

At the moment, no.  And in general there is no way to know which modules
might have been used but weren't in a language as dynamic as Perl.  So
anything that does get implemented (and it is on the TODO list) would be
a heuristic.

As a workaround, you could "use" all the modules in your project inside
one of your .pl files, or make a new one especially for that purpose.

If you carry on down this path though, you will soon end up reinventing
Perl's testing system.  Give serious thought to whether moving to a
standard test layout now wouldn't be a bad use of your time.

> > Coverage without tests is hard though.

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to