in reply to Re: Devel::Cover and symbolic links -- borked?
in thread Devel::Cover and symbolic links -- borked?
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.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 ----------------------------------- ------ ------ ------ ------ ------ + ------
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..."
|
|---|