Bug#463770: Test::Pod: all_pod_files_ok(@dirs) in manpage is incorrect

Gunnar Wolf gwolf at gwolf.org
Fri Feb 8 17:45:59 UTC 2008


tag 463770 + upstream patch
thanks

Hi,

I've forwarded your bug report to the CPAN RT:

http://rt.cpan.org/Ticket/Display.html?id=33025

Patching the module to fix this issue is really trivial:

Index: Pod.pm
===================================================================
--- Pod.pm	(revision 14629)
+++ Pod.pm	(working copy)
@@ -150,7 +150,20 @@
 =cut
 
 sub all_pod_files_ok {
-    my @files = @_ ? @_ : all_pod_files();
+    my (@files);
+    if (@_) {
+	for my $entry (@_) {
+	    if ( -d $entry ) {
+		push @files, all_pod_files($entry);
+	    } elsif ( -f $entry or -l $entry ) {
+		push @files, $entry;
+	    } else {
+		$Test->diag( "$entry does not exist" );
+	    }
+	}
+    } else {
+	@files = all_pod_files();
+    }
 
     $Test->plan( tests => scalar @files );
 
I expect upstream to incorporate it in the next release - if it's not
incorporated, I can add it to our packages... But I don't like modules
deviating from the official behaviour.

Greetings,

-- 
Gunnar Wolf - gwolf at gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF





More information about the pkg-perl-maintainers mailing list