summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-05-28 10:35:57 -0600
committerKarl Williamson <khw@cpan.org>2019-05-30 18:13:29 -0600
commit05ca4832856bc66fae43a8124e42d1dbb7ba4408 (patch)
tree4e5a9de1bc16754e06d82a1ba6eb71f970ce6ffc
parentd40e888a44ac45f4685c8ebcc49d751e42612ffe (diff)
downloadperl-05ca4832856bc66fae43a8124e42d1dbb7ba4408.tar.gz
autodoc.pl: Refactor slightly
This breaks a chain of 'elsif' lines so that they are all now part of an 'else' from the first 'if'. This is in preparation for a later commit.
-rw-r--r--autodoc.pl11
1 files changed, 7 insertions, 4 deletions
diff --git a/autodoc.pl b/autodoc.pl
index a31192e11b..781fb6f3d6 100644
--- a/autodoc.pl
+++ b/autodoc.pl
@@ -211,10 +211,11 @@ removed without notice.\n\n$docs" if $flags =~ /x/;
if ($flags =~ /U/) { # no usage
# nothing
- } elsif ($flags =~ /s/) { # semicolon ("dTHR;")
- print $fh "\t\t$name;\n\n";
+ } else {
+ if ($flags =~ /s/) { # semicolon ("dTHR;")
+ print $fh "\t\t$name;";
} elsif ($flags =~ /n/) { # no args
- print $fh "\t$ret\t$name\n\n";
+ print $fh "\t$ret\t$name";
} else { # full usage
my $p = $flags =~ /o/; # no #define foo Perl_foo
my $n = "Perl_"x$p . $name;
@@ -258,7 +259,9 @@ removed without notice.\n\n$docs" if $flags =~ /x/;
. shift @args;
}
if ($long_args) { print $fh "\n", substr $indent, 0, -4 }
- print $fh ")\n\n";
+ print $fh ")";
+ }
+ print $fh "\n\n";
}
print $fh "=for hackers\nFound in file $file\n\n";
}