Skip Menu |

This queue is for tickets about the Test-Pod-Coverage CPAN distribution.

Report information
The Basics
Id: 67677
Status: open
Priority: 0/
Queue: Test-Pod-Coverage

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

Bug Information
Severity: Critical
Broken in: 1.08
Fixed in: (no value)



Subject: Test::Pod::Coverage finds installed packages but should not
use Test::Pod::Coverage tests=>1; pod_coverage_ok( "MY::DELETED::PACKAGE", "covered" ); But, it was not looking only in blib and should have failed since this package was being deleted from the distribution. Instead it found the one installed in /usr/lib/perl5/vendor_perl/5.10.0/ and mistakenly passed. Mike mrdvt92
From: mrmccrac [...] grnoc.iu.edu
Confirming that I too just ran into the same issue in 5.8.8--it was auditing a module in /usr/lib/perl5/site_perl/5.8.8 instead of the local blib/ copy. On Thu Apr 21 17:43:28 2011, MRDVT wrote: Show quoted text
> use Test::Pod::Coverage tests=>1; > pod_coverage_ok( "MY::DELETED::PACKAGE", "covered" ); > > But, it was not looking only in blib and should have failed since this > package was being deleted from the distribution. > > Instead it found the one installed > in /usr/lib/perl5/vendor_perl/5.10.0/ and mistakenly passed. > > Mike > > mrdvt92
I've encountered this as well. It came as quite a surprise to me that my dist's pod tests were passing while I did the release, but as soon as I released and installed the new version, the same pod tests (obstensibly pointing at the same source) started failing!
On 2011-04-21 14:43:28, MRDVT wrote: Show quoted text
> use Test::Pod::Coverage tests=>1; > pod_coverage_ok( "MY::DELETED::PACKAGE", "covered" ); > > But, it was not looking only in blib and should have failed since this > package was being deleted from the distribution. > > Instead it found the one installed > in /usr/lib/perl5/vendor_perl/5.10.0/ and mistakenly passed. > > Mike > > mrdvt92
The root problem here is a little subtle -- 1, we convert the filename to a module name early on and throw away the filename, 2, we don't preserve whether we are looking in lib or blib, 3, other coverage classes (notably Pod::Coverage::CountParents, which is inherited by Pod::Coverage::TrustPod - used in a huge number of dists) actually *load* the module without first adding lib or blib to @INC. The consequences therefore are: - the caller must use -Ilib, -Mblib, or otherwise ensure that the modules being tested are in @INC (and this should be documented), - the module should check that the thing it loaded actually came from the filename it thinks it should (to catch the deleted-in-local-repository case).