Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-Cover CPAN distribution.

Report information
The Basics
Id: 65920
Status: resolved
Priority: 0/
Queue: Devel-Cover

People
Owner: Nobody in particular
Requestors: larryl [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.73
Fixed in: (no value)



Subject: "blib" does not ignore test files in Devel::Cover 0.73
Download (untitled) / with headers
text/plain 371b
If either the"blib" directory exists or the "-blib" option is true, patterns to ignore test files are pushed onto the @Ignore array at line 328 of Cover.pm. However, mapping the @Ignore array into the @Ignore_re array (which is used for the actual filtering) is done before that at line 299, so the additional test file patterns do not get used. Patch is attached.
Subject: Cover.pm.patch
Download Cover.pm.patch
text/x-diff 1k
*** Cover.pm.orig 2011-02-19 12:18:25.000000000 -0700 --- Cover.pm.new 2011-02-19 12:19:21.000000000 -0700 *************** *** 294,299 **** --- 294,306 ---- warn __PACKAGE__ . ": Unknown option $_ ignored\n"; } + if ($blib) + { + eval "use blib"; + for (@INC) { $_ = $1 if /(.*)/ } # Die tainting. + push @Ignore, "^t/", '\\.t$', '^test\\.pl$'; + } + my $ci = $^O eq "MSWin32"; @Select_re = map qr/$_/, @Select; @Ignore_re = map qr/$_/, @Ignore; *************** *** 321,333 **** $DB = $1 if abs_path($DB) =~ /(.*)/; Devel::Cover::DB->delete($DB) unless $Merge; - if ($blib) - { - eval "use blib"; - for (@INC) { $_ = $1 if /(.*)/ } # Die tainting. - push @Ignore, "^t/", '\\.t$', '^test\\.pl$'; - } - %Files = (); # start gathering file information from scratch for my $c (Devel::Cover::DB->new->criteria) --- 328,333 ----
Thanks very much for the patch. I have applied it and it will be in the next release.
Download (untitled) / with headers
text/plain 159b
On Sat Apr 23 11:34:09 2011, PJCJ wrote: Show quoted text
> Thanks very much for the patch. I have applied it and it will be in the > next release.
Excellent, thanks! Larry


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.