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?

Regards,
~Piyush
Facebook <https://www.facebook.com/piyushkv1> Twitter
<https://twitter.com/SocializePiyush>

On Wed, Jul 22, 2015 at 8:02 PM, Paul Johnson <p...@pjcj.net> wrote:

> 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