summaryrefslogtreecommitdiff
path: root/autodoc.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-05-29 15:58:20 -0600
committerKarl Williamson <khw@cpan.org>2019-05-30 18:13:29 -0600
commit1fcde0e9beb6235547b567747353bc1b85262783 (patch)
treee5ed2c711f57e3a0499976584735c0f4f94c738b /autodoc.pl
parent8b5ff1772f001e0c74deba87357786064655fa3a (diff)
downloadperl-1fcde0e9beb6235547b567747353bc1b85262783.tar.gz
autodoc.pl: Check for misuse of the 'n' flag
This flag indicates that the macro has no arguments. It makes no sense to use in some situations, which are now checked for. This commit also documents the long existing 'n' flag.
Diffstat (limited to 'autodoc.pl')
-rw-r--r--autodoc.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/autodoc.pl b/autodoc.pl
index 9a2e9ec44e..43027a7213 100644
--- a/autodoc.pl
+++ b/autodoc.pl
@@ -22,6 +22,9 @@
# indented. The next input line that is a pod directive terminates this
# heading-level documentation.
+# The meanings of the flags fields in embed.fnc and the source code is
+# documented at the top of embed.fnc.
+
use strict;
if (@ARGV) {
@@ -225,6 +228,8 @@ removed without notice.\n\n$docs" if $flags =~ /x/;
# nothing
} else {
if ($flags =~ /n/) { # no args
+ warn("n flag without m") unless $flags =~ /m/;
+ warn("n flag but apparently has args") if @args;
print $fh "\t$ret\t$name";
} else { # full usage
my $n = "Perl_"x$p . $name;