Well, that was easier than I thought. I wasn't even half-way through setting up the test case when the error popped up. It's not at the level of merging multiple runs as I expected, but in measuring the coverage of runs on the symlinks themselves. Here's your test case.:
File1 Name: main.pl Content: print "hi\n" File2 Name linkdir/main.pl Content: symlink to File1 Run: $ perl -MDevel::Cover main.pl Devel::Cover 0.76: Collecting coverage data for branch, condition, sta +tement, subroutine and time. Pod coverage is unavailable. Please install Pod::Coverage from CP +AN. Selecting packages matching: Ignoring packages matching: /Devel/Cover[./] Ignoring packages in: . /usr/lib/perl5/5.10.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi hi Devel::Cover: Writing coverage database to /path/to/cover_db/runs/1311 +608639.28154 ----------------------------------- ------ ------ ------ ------ ------ + ------ File stmt bran cond sub time + total ----------------------------------- ------ ------ ------ ------ ------ + ------ main.pl 100.0 n/a n/a n/a n/a + 100.0 Total 100.0 0.0 0.0 0.0 n/a + 100.0 ----------------------------------- ------ ------ ------ ------ ------ + ------ $ perl -MDevel::Cover linkdir/main.pl Devel::Cover 0.76: Collecting coverage data for branch, condition, sta +tement, subroutine and time. Pod coverage is unavailable. Please install Pod::Coverage from CP +AN. Selecting packages matching: Ignoring packages matching: /Devel/Cover[./] Ignoring packages in: . /usr/lib/perl5/5.10.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi hi Devel::Cover: Writing coverage database to /path/to/cover_db/runs/1311 +608812.28180 ----------------------------------- ------ ------ ------ ------ ------ + ------ File stmt bran cond sub time + total ----------------------------------- ------ ------ ------ ------ ------ + ------ linkdir/main.pl n/a n/a n/a n/a n/a + n/a Total 0.0 0.0 0.0 0.0 n/a + 0.0 ----------------------------------- ------ ------ ------ ------ ------ + ------
The problem is measuring code coverage at all when running a symbolically linked script that is not in the current working director. I didn't show the results, but if you run the same symlinked script without running the 'main' non-linked path first, then it captures the coverage. When you run main.pl first, then run linkdir/main.pl next that's when you get the failure.

update: Forgot to mention that you don't get this error when the symlink is in the same directory as what it links to.

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."


In reply to Re^2: Devel::Cover and symbolic links -- borked? by DrWhy
in thread Devel::Cover and symbolic links -- borked? by DrWhy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.