5 check_NAMEs.pl - check NAME in module POD has fully qualified object name
9 B<check_NAMEs.pl> [B<-d|--dir> path] [B<-v|--verbose>] [B<-?|-h|--help>]
13 This script is designed to find all Bioperl modules which don't
14 have the fully qualified object name with correct capitalization
15 in the "NAME" section of the POD.
17 The full name is required for the PDOC POD to HTML script to
18 correctly render the module documentation.
27 # command line options
30 my ($verbose, $dir, $help) = (0, '../Bio/', undef);
32 'v|verbose' => \
$verbose,
34 'h|help|?' => sub{ exec('perldoc',$0); exit(0) }
47 print STDERR
"Searching for incorrect NAME POD section of all modules in: $dir\n";
48 find
( \
&find_modules
, $dir );
49 print STDERR
"$num_found found.\n";
51 # this is where the action is
54 # only want files with .pm
55 return unless m/\.pm$/;
59 my $pm = $File::Find
::name
;
60 $pm =~ s{.*?/(?=Bio/)}{}; # remove up to first slash before Bio/
61 $pm =~ s{\.pm$}{}; # remove .pm suffix
62 $pm =~ s{/}{::}g; # convert / to ::
64 print STDERR
"# $File::Find::name\n" if $verbose;
67 my $text = do { local( @ARGV, $/ ) = $fname ; <> } ;
69 # check if the NAME section has the _full_ module name in it
70 if ($text !~ m/^=head1\s+NAME.*?^$pm/xms) {
81 =item B<-d | --dir> path
83 Overides the default directory to recursively look for .pm file
86 =item B<-v | --verbose>
88 Show the progress through files during the POD checking.
90 =item B<-? | -h | --help>
100 User feedback is an integral part of the evolution of this and other
101 Bioperl modules. Send your comments and suggestions preferably to
102 the Bioperl mailing list. Your participation is much appreciated.
104 bioperl-l@bioperl.org - General discussion
105 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
107 =head2 Reporting Bugs
109 Report bugs to the Bioperl bug tracking system to help us keep track
110 of the bugs and their resolution. Bug reports can be submitted via the
113 https://github.com/bioperl/bioperl-live/issues
115 =head1 AUTHOR - Torsten Seemann
117 Email: torsten-dot-seemann-at-infotech-dot-monash-dot-edu-dot-au