blob: bf0e100cc29355f01b80d6cb3763bab1a12b3d7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/usr/bin/env perl
#-*- perl -*-
#
# $FML: stylecheck,v 1.1 2002/01/13 22:06:34 fukachan Exp $
#
use strict;
use Carp;
my $in_perldoc = 0;
my $package = '';
my $fn = '';
my $PrevARGV = '';
my $num_file = 0;
while (<>) {
next if /^\#/;
if ($ARGV ne $PrevARGV) {
$in_perldoc = 0;
$package = '';
$fn = '';
$PrevARGV = $ARGV;
$num_file++;
print STDERR "reset $num_file $ARGV\n" if $ENV{'debug'};
}
$in_perldoc = 1 if /^=/;
if (/^package (\S+);/) {
$package = $1;
next;
}
if (/^=cut/) {
$in_perldoc = 0;
next;
}
if (/^sub (\S+)/) {
$fn = $1;
if ($in_perldoc) {
print STDERR "${package}::$fn is in document ???\n";
}
else {
print STDERR "${package}::$fn is ok\n" if $ENV{'debug'};
}
}
if (/^1\;\s*$/ && $in_perldoc) {
print STDERR "${package} ends in document ???\n";
}
}
exit 0
|