Subject: | all_pod_files_ok does not operate on directories |
The documentation for your module reads:
all_pod_files_ok( [@files/@directories] )
Checks all the files in @files for valid POD. It runs
all_pod_files() on each file/directory, and calls the "plan()" function
for you (one test for each function), so you can’t have already called
"plan".
It works correctly when specifying a list of files - But it does not
call all_pod_files if what it receives is a directory.
The attached patch will follow the mentioned directories.
Subject: | test-pod.diff |
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 );