diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-04-30 08:39:44 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-05-20 11:01:50 -0600 |
commit | d4e99c76278c7e400307b1a7ceeb3b27676dfd3d (patch) | |
tree | f8a153771e62267021b6c342f614c0606b243922 /autodoc.pl | |
parent | 6ef8d77a18f45460857e0866d103b834ec25d432 (diff) | |
download | perl-d4e99c76278c7e400307b1a7ceeb3b27676dfd3d.tar.gz |
autodoc.pl: Add note for deprecated functions
This causes each deprecated function to have a prominent note to that
effect in its API documentation.
Diffstat (limited to 'autodoc.pl')
-rw-r--r-- | autodoc.pl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/autodoc.pl b/autodoc.pl index 925f2f541f..7f60443cd7 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -113,6 +113,7 @@ DOC: if ($docref and %$docref) { $embed_where = $docref->{flags} =~ /A/ ? 'api' : 'guts'; $embed_may_change = $docref->{flags} =~ /M/; + $flags .= 'D' if $docref->{flags} =~ /D/; } else { $missing{$name} = $file; } @@ -171,8 +172,15 @@ sub docout ($$$) { # output the docs for one function my($flags, $docs, $ret, $file, @args) = @$docref; $name =~ s/\s*$//; - $docs .= "NOTE: this function is experimental and may change or be + if ($flags =~ /D/) { + $docs = "\n\nDEPRECATED! It is planned to remove this function from a +future release of Perl. Do not use it for new code; remove it from +existing code.\n\n$docs"; + } + else { + $docs .= "NOTE: this function is experimental and may change or be removed without notice.\n\n" if $flags =~ /x/; + } $docs .= "NOTE: the perl_ form of this function is deprecated.\n\n" if $flags =~ /p/; $docs .= "NOTE: this function must be explicitly called as Perl_$name with an aTHX_ parameter.\n\n" |