diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-06-25 16:36:45 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-06-25 16:36:45 +0000 |
commit | 732bce8ca9ade99f36ea3935c33c641ae9422f3e (patch) | |
tree | 9a4771a5c0513e38486d37054546aef19b6f401d /embed.pl | |
parent | 21fff32650ffc8719558f625ca6c5cc49a442d92 (diff) | |
download | perl-732bce8ca9ade99f36ea3935c33c641ae9422f3e.tar.gz |
Tweak embed.pl, regen headers.
p4raw-id: //depot/cfgperl@6237
Diffstat (limited to 'embed.pl')
-rwxr-xr-x | embed.pl | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -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"; } |