On Wed, Jul 22, 2015 at 04:56:12PM +0300, Shlomi Fish wrote:
> Hi Piyush,
> 
> On Wed, 22 Jul 2015 19:08:20 +0530
> Piyush Verma <114piy...@gmail.com> wrote:
> 
> > Hi,
> > 
> > I want to collect code coverage data of my perl project which has a .pl
> > file and .pm files.
> > If I include this module in each file, I'm getting result only of .pl file.
> > 
> > Can anyone suggest about the use case so that I can collect code coverage
> > data of all files.
> > 
> 
> Devel::Cover is for determining the *tests'* coverage. Do you have any t/*.t
> files? Please follow the synopsis of running Devel::Cover here:
> 
> https://metacpan.org/pod/Devel::Cover#SYNOPSIS

You can use Devel::Cover without tests too.  After all, a test is just a
program, the same as your .pl files.

However, unless your program doesn't require any input, you will need to
run it multiple times with varying input to get proper coverage
information.

And the way to do this is also in the synopsis that Shlomi pointed you
to.

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