summaryrefslogtreecommitdiff
path: root/embed.pl
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-06-25 16:36:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-06-25 16:36:45 +0000
commit732bce8ca9ade99f36ea3935c33c641ae9422f3e (patch)
tree9a4771a5c0513e38486d37054546aef19b6f401d /embed.pl
parent21fff32650ffc8719558f625ca6c5cc49a442d92 (diff)
downloadperl-732bce8ca9ade99f36ea3935c33c641ae9422f3e.tar.gz
Tweak embed.pl, regen headers.
p4raw-id: //depot/cfgperl@6237
Diffstat (limited to 'embed.pl')
-rwxr-xr-xembed.pl21
1 files changed, 16 insertions, 5 deletions
diff --git a/embed.pl b/embed.pl
index c0716f7119..419ae4e89c 100755
--- a/embed.pl
+++ b/embed.pl
@@ -1083,10 +1083,10 @@ my %docfuncs;
sub autodoc ($$) { # parse a file and extract documentation info
my($fh,$file) = @_;
- my($in, $doc);
-
+ my($in, $doc, $line);
FUNC:
while (defined($in = <$fh>)) {
+ $line++;
if ($in =~ /^=for\s+apidoc\s+(.*)\n/) {
my $proto = $1;
$proto = "||$proto" unless $proto =~ /\|/;
@@ -1094,7 +1094,12 @@ FUNC:
my $docs = "";
DOC:
while (defined($doc = <$fh>)) {
+ $line++;
last DOC if $doc =~ /^=\w+/;
+ if ($doc =~ m:^\*/$:) {
+ warn "=cut missing? $file:$line:$doc";;
+ last DOC;
+ }
$docs .= $doc;
}
$docs = "\n$docs" if $docs and $docs !~ /^\n/;
@@ -1109,9 +1114,13 @@ DOC:
else {
$docfuncs{$name} = [$flags, $docs, $ret, $file, @args];
}
- if ($doc =~ /^=for/) {
- $in = $doc;
- redo FUNC;
+ if (defined $doc) {
+ if ($doc =~ /^=for/) {
+ $in = $doc;
+ redo FUNC;
+ }
+ } else {
+ warn "$file:$line:$in";
}
}
}
@@ -1172,6 +1181,8 @@ walk_table { # load documented functions into approriate hash
} \*DOC;
for (sort keys %docfuncs) {
+ # Have you used a full for apidoc or just a func name?
+ # Have you used Ap instead of Am in the for apidoc?
warn "Unable to place $_!\n";
}