summaryrefslogtreecommitdiff
path: root/autodoc.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-04-17 10:15:42 +0100
committerNicholas Clark <nick@ccl4.org>2009-04-17 10:21:48 +0100
commit848ad75c717886b27932509687e0ca4b7eef020a (patch)
tree3568ecec8ae0e358d0f2f9482ade8b3b303f084e /autodoc.pl
parent8d0cd07e60fc3c5cfbe27ab52b37bb52f7997330 (diff)
downloadperl-848ad75c717886b27932509687e0ca4b7eef020a.tar.gz
In autodoc.pl, remove the unused parameters and functionality from walk_table().
It seems that walk_table() was a direct copy from embed.pl back when autodoc.pl was created by commit 94bdecf9800c3bee967274854f7adf2933ffd42b, and the "bonus bits" were never refactored out.
Diffstat (limited to 'autodoc.pl')
-rw-r--r--autodoc.pl24
1 files changed, 2 insertions, 22 deletions
diff --git a/autodoc.pl b/autodoc.pl
index 25fabf0ca4..0e8258f6dd 100644
--- a/autodoc.pl
+++ b/autodoc.pl
@@ -23,21 +23,6 @@ open IN, "embed.fnc" or die $!;
# subroutine, printing the result
sub walk_table (&@) {
my $function = shift;
- my $filename = shift || '-';
- my $leader = shift;
- my $trailer = shift;
- my $F;
- local *F;
- if (ref $filename) { # filehandle
- $F = $filename;
- }
- else {
- safer_unlink $filename;
- $F = safer_open($filename);
- binmode F;
- $F = \*F;
- }
- print $F $leader if $leader;
seek IN, 0, 0; # so we may restart
while (<IN>) {
chomp;
@@ -55,11 +40,7 @@ sub walk_table (&@) {
@args = split /\s*\|\s*/, $_;
}
s/\b(NN|NULLOK)\b\s+//g for @args;
- print $F $function->(@args);
- }
- print $F $trailer if $trailer;
- unless (ref $filename) {
- close $F or die "Error closing $filename: $!";
+ $function->(@args);
}
}
@@ -208,8 +189,7 @@ walk_table { # load documented functions into appropriate hash
warn "no docs for $func\n" unless $seenfuncs{$func};
}
}
- return "";
-} $doc;
+};
for (sort keys %docfuncs) {
# Have you used a full for apidoc or just a func name?