Skip Menu |

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

Report information
The Basics
Id: 60528
Status: new
Priority: 0/
Queue: Test-Pod-Coverage

People
Owner: Nobody in particular
Requestors: sam [...] lokku.com
Cc:
AdminCc:

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



Subject: bug in Test::Pod::Coverage
Date: Thu, 19 Aug 2010 17:35:17 +0100
To: bug-Test-Pod-Coverage [...] rt.cpan.org
From: Sam Braithwaite <sam [...] lokku.com>
There appears to be a bug in the all_modules method of Test::Pod::Coverage (latest version, 1.08). Coverage.pm dies at line 235 when using an absolute path, as the preceding forward slash gets passed to File::Spec->splitdir and this causes @parts to contain an empty initial element, which causes the check on all elements of @parts containing characters to evaluate false. I do not have a patch yet but wondered if there is anything which can be done to easily fix this problem? Relevant code: Coverage.pm 224: my @parts = File::Spec->splitdir( $file ); 225: shift @parts if @parts && exists $starters{$parts[0]}; 226: shift @parts if @parts && $parts[0] eq "lib"; 227: $parts[-1] =~ s/\.pm$// if @parts; 228: 229: # Untaint the parts 230: for ( @parts ) { 231: if ( /^([a-zA-Z0-9_\.\-]+)$/ && ($_ eq $1) ) { 232: $_ = $1; # Untaint the original 233: } 234: else { 235: die qq{Invalid and untaintable filename "$file"!}; 236: } 237: } Thanks Sam