diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-12-22 12:07:33 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-12-24 09:30:09 +0100 |
commit | 65e5b0167e9699a603db53d07657ab54bfacfa34 (patch) | |
tree | 8e7d70ce392dd7831428654af8ab2d57ad34132d | |
parent | 9bbb230a203c96fa7e8a45ef46e37c00319fafb1 (diff) | |
download | perl-65e5b0167e9699a603db53d07657ab54bfacfa34.tar.gz |
In pods_to_install(), use $File::Find::prune to skip t/ directories.
We don't want to install anything within a t/ directory. Previously the code
was determining this based on pattern matching the path. Instead of rejecting
what we find, it's more efficient to avoid scanning the directory tree in the
first place.
-rw-r--r-- | Porting/pod_lib.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Porting/pod_lib.pl b/Porting/pod_lib.pl index 7efe7686dc..94cf0265fb 100644 --- a/Porting/pod_lib.pl +++ b/Porting/pod_lib.pl @@ -47,9 +47,13 @@ sub pods_to_install { File::Find::find({no_chdir=>1, wanted => sub { + if (m!/t\z!) { + ++$File::Find::prune; + return; + } + # $_ is $File::Find::name when using no_chdir return unless m!\.p(?:m|od)\z! && -f $_; - return if m!(?:^|/)t/!; return if m!lib/Net/FTP/.+\.pm\z!; # Hi, Graham! :-) # Skip .pm files that have corresponding .pod files return if s!\.pm\z!.pod! && -e $_; |