Re: Why does File::Path not respond to 'cover'?

[email protected] (yary) Sat, 27 Jun 2015 13:55:09 -0400
Newsgroups perl.qa
Message-ID <CAG2CFAZbqfUANPmcV1AV0kCEdk2W7mLxxOzGNyG79Y8smobC7g@mail.gmail.com>
--089e0122a2d0e5a1c10519838fdb
Content-Type: text/plain; charset=UTF-8

I believe that Devel::Cover excludes core modules, so that "your code"
isn't influenced by modules that are included (perhaps indirectly). Seek
out a switch/hash/regexp/sub to modify that behavior, there is one
somewhere!

-y

On Fri, Jun 26, 2015 at 10:08 PM, James E Keenan <[email protected]> wrote:

> Richard Elberger and I recently received co-maintenance bits on the
> File-Path distribution.  As is my wont, I ran it through Devel::Cover --
> but was surprised to see that 'cover' reported zero coverage.
>
> #####
> $ perl Makefile.PL && make
> Generating a Unix-style Makefile
> Writing Makefile for File::Path
> Writing MYMETA.yml and MYMETA.json
> Skip blib/lib/File/Path.pm (unchanged)
> Manifying blib/man3/File::Path.3
>
> $ HARNESS_PERL_SWITCHES=-MDevel::Cover make test
> PERL_DL_NONLAZY=1 /home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/bin/perl
> "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef
> *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/Path-Class.t .. ok
> t/Path.t ........ 1/152 bug487319/symlink for bug487319/symlink: No such
> file or directory at t/Path.t line 369.
> t/Path.t ........ ok
> t/pod.t ......... skipped: PERL_AUTHOR_TESTING environment variable not
> set (or zero)
> t/taint.t ....... ok
> All tests successful.
> Files=4, Tests=190,  1 wallclock secs ( 0.04 usr  0.00 sys +  0.99 cusr
> 0.03 csys =  1.06 CPU)
> Result: PASS
>
> $ cover
> Reading database from /home/jkeenan/gitwork/File-Path/cover_db
>
>
> ----------------------------------- ------ ------ ------ ------ ------
> ------
> File                                  stmt   bran   cond    sub   time
> total
> ----------------------------------- ------ ------ ------ ------ ------
> ------
> blib/lib/File/Path.pm                  0.0    0.0    0.0    0.0    n/a
>  0.0
> Total                                  0.0    0.0    0.0    0.0    n/a
>  0.0
> ----------------------------------- ------ ------ ------ ------ ------
> ------
>
>
> HTML output written to
> /home/jkeenan/gitwork/File-Path/cover_db/coverage.html
> done.
> #####
>
> I hypothesized that perhaps results would be different if I were to move
> ./Path.pm to lib/File/Path.pm -- but I got the same results.
>
> Does anyone know why File-Path is unresponsive to 'cover'?
>
> Thank you very much.
> Jim Keenan
>

--089e0122a2d0e5a1c10519838fdb
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I believe that Devel::Cover excludes core modules, so that=
 &quot;your code&quot; isn&#39;t influenced by modules that are included (p=
erhaps indirectly). Seek out a switch/hash/regexp/sub to modify that behavi=
or, there is one somewhere!<br></div><div class=3D"gmail_extra"><br clear=
=3D"all"><div><div class=3D"gmail_signature">-y<br></div></div>
<br><div class=3D"gmail_quote">On Fri, Jun 26, 2015 at 10:08 PM, James E Ke=
enan <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_=
blank">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">Richard Elberger and I recently received co-maintenance bits on the F=
ile-Path distribution.=C2=A0 As is my wont, I ran it through Devel::Cover -=
- but was surprised to see that &#39;cover&#39; reported zero coverage.<br>
<br>
#####<br>
$ perl Makefile.PL &amp;&amp; make<br>
Generating a Unix-style Makefile<br>
Writing Makefile for File::Path<br>
Writing MYMETA.yml and MYMETA.json<br>
Skip blib/lib/File/Path.pm (unchanged)<br>
Manifying blib/man3/File::Path.3<br>
<br>
$ HARNESS_PERL_SWITCHES=3D-MDevel::Cover make test<br>
PERL_DL_NONLAZY=3D1 /home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/bin/perl=
 &quot;-MExtUtils::Command::MM&quot; &quot;-MTest::Harness&quot; &quot;-e&q=
uot; &quot;undef *Test::Harness::Switches; test_harness(0, &#39;blib/lib&#3=
9;, &#39;blib/arch&#39;)&quot; t/*.t<br>
t/Path-Class.t .. ok<br>
t/Path.t ........ 1/152 bug487319/symlink for bug487319/symlink: No such fi=
le or directory at t/Path.t line 369.<br>
t/Path.t ........ ok<br>
t/pod.t ......... skipped: PERL_AUTHOR_TESTING environment variable not set=
 (or zero)<br>
t/taint.t ....... ok<br>
All tests successful.<br>
Files=3D4, Tests=3D190,=C2=A0 1 wallclock secs ( 0.04 usr=C2=A0 0.00 sys +=
=C2=A0 0.99 cusr=C2=A0 0.03 csys =3D=C2=A0 1.06 CPU)<br>
Result: PASS<br>
<br>
$ cover<br>
Reading database from /home/jkeenan/gitwork/File-Path/cover_db<br>
<br>
<br>
----------------------------------- ------ ------ ------ ------ ------ ----=
--<br>
File=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 stmt=C2=A0 =C2=A0bran=C2=
=A0 =C2=A0cond=C2=A0 =C2=A0 sub=C2=A0 =C2=A0time total<br>
----------------------------------- ------ ------ ------ ------ ------ ----=
--<br>
blib/lib/File/Path.pm=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 0.0=C2=A0 =C2=A0 0.0=C2=A0 =C2=A0 0.0=C2=A0 =C2=A0 0.0=C2=A0 =C2=
=A0 n/a=C2=A0 =C2=A00.0<br>
Total=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.0=C2=A0 =C2=A0 0.0=C2=A0=
 =C2=A0 0.0=C2=A0 =C2=A0 0.0=C2=A0 =C2=A0 n/a=C2=A0 =C2=A00.0<br>
----------------------------------- ------ ------ ------ ------ ------ ----=
--<br>
<br>
<br>
HTML output written to /home/jkeenan/gitwork/File-Path/cover_db/coverage.ht=
ml<br>
done.<br>
#####<br>
<br>
I hypothesized that perhaps results would be different if I were to move ./=
Path.pm to lib/File/Path.pm -- but I got the same results.<br>
<br>
Does anyone know why File-Path is unresponsive to &#39;cover&#39;?<br>
<br>
Thank you very much.<br>
Jim Keenan<br>
</blockquote></div><br></div>

--089e0122a2d0e5a1c10519838fdb--