package Pod::Find;
use vars qw($VERSION);
-$VERSION = 0.24; ## Current version of this package
+$VERSION = 1.34; ## Current version of this package
require 5.005; ## requires this Perl version or later
use Carp;
use Pod::Find qw(pod_find);
+From this version on the typical SCM (software configuration management)
+files/directories like RCS, CVS, SCCS, .svn are ignored.
+
=cut
use strict;
File::Find::find( sub {
my $item = $File::Find::name;
if(-d) {
- if($dirs_visited{$item}) {
+ if($item =~ m{/(?:RCS|CVS|SCCS|\.svn)$}) {
+ $File::Find::prune = 1;
+ return;
+ }
+ elsif($dirs_visited{$item}) {
warn "Directory '$item' already seen, skipping.\n"
if($opts{-verbose});
$File::Find::prune = 1;
# check extension or executable flag
# this involves testing the .bat extension on Win32!
- unless(-f $file && -T _ && ($file =~ /\.(pod|pm|plx?)\z/i || -x _ )) {
+ unless(-f $file && -T $file && ($file =~ /\.(pod|pm|plx?)\z/i || -x $file )) {
return undef;
}
local $/ = undef;
my $pod = <POD>;
close(POD) || die "Error closing $file: $!\n";
- unless($pod =~ /\n=(head\d|pod|over|item)\b/s) {
+ unless($pod =~ /^=(head\d|pod|over|item)\b/m) {
warn "No POD in $file, skipping.\n"
if($verbose);
return 0;