Skip to content

Commit 20616d5

Browse files
Russ Allberyjkeenan
Russ Allbery
authored andcommitted
Update podlators to CPAN version 5.00
5.00 - 2022-11-25: Changes Drop support for Perl 5.8. The minimum required version is Perl 5.10. The default output encoding of Pod::Man on non-EBCDIC systems is now UTF-8. The utf8 option (-u or --utf8 to pod2man) is now ignored, since it is the default. See the ENCODING section of its documentation for testing results and further discussion. (#68741) Pod::Man now supports an encoding option (-e or --encoding to pod2man), to change the output encoding to any encoding recognized by Encode, or the special values groff or roff. Setting it to roff requests the old behavior of using character substitutions and *roff escapes to generate ASCII-only output (the default prior to this version). Pod::Man now supports the groff output encoding, which replaces all non-ASCII characters with \[uNNNN] escapes. This escape was not supported by the originally *roff implementation, but it is supported by groff and mandoc and allows proper representation of Unicode characters. This output format has no known advantages in portability over UTF-8 on non-EBCDIC systems. It is the default output format on EBCDIC systems, and when the Encode module is not available. (#73804) Pod::Man no longer does guesswork transformations that only affected troff output. Formatting manual pages with troff is exceptionally rare, and this magic caused constant maintenance issues. This means "--" is no longer changed to an em-dash, strings of capital letters aren't made a bit smaller, no attempt is made to change double quotes to paired quotes, and no special formatting is done for C++. (#132007) Guesswork (formatting rules based on heuristics intended for Perl documentation) can now be disabled or selectively enabled in Pod::Man with the guesswork option (--guessword to pod2man). (#143668) Pod::Text now supports an encoding option (-e or --encoding to pod2text) to force the output encoding, similar to Pod::Man. The utf8 option (-u or --utf8 to pod2text) is still supported and is equivalent to setting encoding to UTF-8. Pod::Text now defaults to UTF-8 encoding if it sees a non-ASCII character on a non-EBCDIC system and the input encoding is not specified. This should fix rendering of E<> escapes of non-ASCII characters in POD files that don't specify an input encoding, at the cost of assuming UTF-8 output. Pod::Text also now commits to an encoding the first time it outputs a non-ASCII character and sticks with that encoding for the rest of the file, even if the detected or declared input encoding changes. (#102631) Stop using a PerlIO encoding layer for Pod::Text output and instead use Encode. If a PerlIO encoding layer is already set, trust it and do no encoding. This fixes encoding problems with output to a string. Add a coding tag comment to the start of Pod::Man output if the output encoding is not ASCII. groff's preconv program and FreeBSD's mandoc will use this line to determine the input encoding. Pod::Man now supports a language option (--language to pod2man) that adds groff language configuration commands to the start of the output. This is required for proper line breaking of Japanese and Chinese text when the manual page is not installed in a language-specific directory so that the man program knows to add that configuration automatically. Unfortunately, the commands added when this option is used are groff-specific. Thanks to zynldyx for the bug report and suggested fix. Pod::Man now converts Unicode zero-width spaces (U+200B) to the *roff escape \:, which indicates a line break point without a space or hyphen. (Unfortunately, groff does not honor U+200B itself as a line break point.) This escape is not part of the language defined in CSTR this escape won't cause problems. (Debian Bug#941980) Pod::Man and Pod::Text now correctly honor S<> wrapping L<> with an anchor and URL, and make the space between the anchor and URL nonbreaking. (#143768) Clear the current font before changing fonts in all Pod::Man output, not just headings. groff 1.22.4 does not clear bold or italic when seeing \f(CW font change, which meant bold and italic were extending farther than they should without this change. (#143667) Honor the quotes, lquote, and rquote configuration parameters to Pod::Man for C<> text inside the special NAME section. (#143967) Pod::Man suppresses quote marks around some additional cases of Perl code in C<> where the intent had been to suppress the quotes but there were various bugs in the matching regular expressions. This primarily affects method calls and negative numbers. Avoid non-standard *roff escape in the troff accent mark definition for an acute accent. \h"..." was used instead of \h'...' as seen in the other accent mark definitions. This error appears to have existed since the first version of Pod::Man. Thanks, Paul Evans. (GitHub #14) Document that nroff adds two spaces after each sentence when reflowing, and therefore if you want formatted Pod::Man output to consistently have one space after each sentence, you will have to avoid ending a sentence at the end of a line in the middle of a paragraph. Committer: Adjust Porting/Maintainers.pl and Porting/sync-with-cpan to reflect upstream acceptance of customizations in core distribution.
1 parent 85900e2 commit 20616d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+3369
-1233
lines changed

MANIFEST

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,6 +1838,7 @@ cpan/Pod-Usage/t/pod/testcmp.pl
18381838
cpan/Pod-Usage/t/pod/testp2pt.pl
18391839
cpan/Pod-Usage/t/pod/usage.pod
18401840
cpan/Pod-Usage/t/pod/usage2.pod
1841+
cpan/podlators/docs/docknot.yaml
18411842
cpan/podlators/lib/Pod/Man.pm Convert POD data to *roff
18421843
cpan/podlators/lib/Pod/ParseLink.pm Perl an L<> formatting code in POD text
18431844
cpan/podlators/lib/Pod/Text.pm Pod-Parser - convert POD data to formatted ASCII text
@@ -1853,7 +1854,12 @@ cpan/podlators/t/data/basic.man podlators test
18531854
cpan/podlators/t/data/basic.ovr podlators test
18541855
cpan/podlators/t/data/basic.pod podlators test
18551856
cpan/podlators/t/data/basic.txt podlators test
1857+
cpan/podlators/t/data/man/encoding.groff
1858+
cpan/podlators/t/data/man/encoding.pod
1859+
cpan/podlators/t/data/man/encoding.roff
1860+
cpan/podlators/t/data/man/encoding.utf8
18561861
cpan/podlators/t/data/perl.conf podlators test
1862+
cpan/podlators/t/data/regenerate-data
18571863
cpan/podlators/t/data/snippets/color/escape-wrapping
18581864
cpan/podlators/t/data/snippets/color/tag-width
18591865
cpan/podlators/t/data/snippets/color/tag-wrapping
@@ -1877,39 +1883,52 @@ cpan/podlators/t/data/snippets/man/eth
18771883
cpan/podlators/t/data/snippets/man/fixed-font
18781884
cpan/podlators/t/data/snippets/man/fixed-font-in-item
18791885
cpan/podlators/t/data/snippets/man/for-blocks
1886+
cpan/podlators/t/data/snippets/man/guesswork
1887+
cpan/podlators/t/data/snippets/man/guesswork-all
1888+
cpan/podlators/t/data/snippets/man/guesswork-no-quoting
1889+
cpan/podlators/t/data/snippets/man/guesswork-none
1890+
cpan/podlators/t/data/snippets/man/guesswork-partial
1891+
cpan/podlators/t/data/snippets/man/guesswork-quoting
18801892
cpan/podlators/t/data/snippets/man/hyphen-in-s
18811893
cpan/podlators/t/data/snippets/man/iso-8859-1
1894+
cpan/podlators/t/data/snippets/man/iso-8859-1-error-die
1895+
cpan/podlators/t/data/snippets/man/iso-8859-1-error-pod
1896+
cpan/podlators/t/data/snippets/man/iso-8859-1-roff
18821897
cpan/podlators/t/data/snippets/man/item-fonts
1898+
cpan/podlators/t/data/snippets/man/language
18831899
cpan/podlators/t/data/snippets/man/link-quoting
18841900
cpan/podlators/t/data/snippets/man/link-to-url
18851901
cpan/podlators/t/data/snippets/man/long-quote
18861902
cpan/podlators/t/data/snippets/man/lquote-and-quote
18871903
cpan/podlators/t/data/snippets/man/lquote-rquote
18881904
cpan/podlators/t/data/snippets/man/markup-in-name
18891905
cpan/podlators/t/data/snippets/man/multiline-x
1906+
cpan/podlators/t/data/snippets/man/naive
1907+
cpan/podlators/t/data/snippets/man/naive-groff
18901908
cpan/podlators/t/data/snippets/man/name-guesswork
1909+
cpan/podlators/t/data/snippets/man/name-quotes
1910+
cpan/podlators/t/data/snippets/man/name-quotes-none
18911911
cpan/podlators/t/data/snippets/man/nested-lists
18921912
cpan/podlators/t/data/snippets/man/newlines-in-c
18931913
cpan/podlators/t/data/snippets/man/non-ascii
1914+
cpan/podlators/t/data/snippets/man/nonbreaking-space-l
18941915
cpan/podlators/t/data/snippets/man/not-bullet
18951916
cpan/podlators/t/data/snippets/man/not-numbers
18961917
cpan/podlators/t/data/snippets/man/nourls
1897-
cpan/podlators/t/data/snippets/man/paired-quotes
18981918
cpan/podlators/t/data/snippets/man/periods
18991919
cpan/podlators/t/data/snippets/man/quote-escaping
19001920
cpan/podlators/t/data/snippets/man/rquote-none
1901-
cpan/podlators/t/data/snippets/man/small-caps-magic
19021921
cpan/podlators/t/data/snippets/man/soft-hyphens
19031922
cpan/podlators/t/data/snippets/man/trailing-space
19041923
cpan/podlators/t/data/snippets/man/true-false
1905-
cpan/podlators/t/data/snippets/man/uppercase-license
19061924
cpan/podlators/t/data/snippets/man/utf8-nonbreaking
19071925
cpan/podlators/t/data/snippets/man/utf8-verbatim
19081926
cpan/podlators/t/data/snippets/man/x-whitespace
19091927
cpan/podlators/t/data/snippets/man/x-whitespace-entry
1928+
cpan/podlators/t/data/snippets/man/zero-width-space
19101929
cpan/podlators/t/data/snippets/overstrike/tag-width
19111930
cpan/podlators/t/data/snippets/overstrike/wrapping
1912-
cpan/podlators/t/data/snippets/README podlators test
1931+
cpan/podlators/t/data/snippets/README.md
19131932
cpan/podlators/t/data/snippets/termcap/escape-wrapping
19141933
cpan/podlators/t/data/snippets/termcap/tag-width
19151934
cpan/podlators/t/data/snippets/termcap/tag-wrapping
@@ -1929,11 +1948,19 @@ cpan/podlators/t/data/snippets/text/error-stderr
19291948
cpan/podlators/t/data/snippets/text/error-stderr-opt
19301949
cpan/podlators/t/data/snippets/text/for
19311950
cpan/podlators/t/data/snippets/text/iso-8859-1
1951+
cpan/podlators/t/data/snippets/text/iso-8859-1-error-die
1952+
cpan/podlators/t/data/snippets/text/iso-8859-1-error-pod
1953+
cpan/podlators/t/data/snippets/text/iso-8859-1-utf8
19321954
cpan/podlators/t/data/snippets/text/late-encoding
19331955
cpan/podlators/t/data/snippets/text/link-rt
19341956
cpan/podlators/t/data/snippets/text/link-url
19351957
cpan/podlators/t/data/snippets/text/margin
1958+
cpan/podlators/t/data/snippets/text/naive
1959+
cpan/podlators/t/data/snippets/text/name-quotes
1960+
cpan/podlators/t/data/snippets/text/name-quotes-none
1961+
cpan/podlators/t/data/snippets/text/non-latin
19361962
cpan/podlators/t/data/snippets/text/nonbreaking-space
1963+
cpan/podlators/t/data/snippets/text/nonbreaking-space-l
19371964
cpan/podlators/t/data/snippets/text/nourls
19381965
cpan/podlators/t/data/snippets/text/periods
19391966
cpan/podlators/t/data/snippets/text/quotes-opt
@@ -1943,6 +1970,7 @@ cpan/podlators/t/data/snippets/text/utf8
19431970
cpan/podlators/t/data/snippets/text/utf8-iso
19441971
cpan/podlators/t/data/snippets/text/verbatim
19451972
cpan/podlators/t/data/termcap podlators test
1973+
cpan/podlators/t/docs/changes.t
19461974
cpan/podlators/t/docs/pod.t podlators test
19471975
cpan/podlators/t/docs/pod-spelling.t podlators test
19481976
cpan/podlators/t/docs/spdx-license.t podlators test
@@ -1957,6 +1985,7 @@ cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm podlators test
19571985
cpan/podlators/t/man/devise-date.t podlators test
19581986
cpan/podlators/t/man/devise-title.t podlators test
19591987
cpan/podlators/t/man/empty.t podlators test
1988+
cpan/podlators/t/man/encoding.t
19601989
cpan/podlators/t/man/heading.t podlators test
19611990
cpan/podlators/t/man/iso-8859-1.t podlators test
19621991
cpan/podlators/t/man/no-encode.t podlators test

Porting/Maintainers.pl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -983,19 +983,11 @@ package Maintainers;
983983
},
984984

985985
'podlators' => {
986-
'DISTRIBUTION' => 'RRA/podlators-4.14.tar.gz',
986+
'DISTRIBUTION' => 'RRA/podlators-5.00.tar.gz',
987987
'MAIN_MODULE' => 'Pod::Man',
988988
'FILES' => q[cpan/podlators pod/perlpodstyle.pod],
989989
'EXCLUDED' => [
990-
qr{^docs/metadata/},
991-
],
992-
993-
# https://github.com/rra/podlators/pull/15
994-
'CUSTOMIZED' => [
995-
't/general/basic.t',
996-
't/man/empty.t',
997-
't/man/no-encode.t',
998-
't/text/invalid.t',
990+
qr{^\.github/workflows/build\.yaml},
999991
],
1000992

1001993
'MAP' => {

Porting/sync-with-cpan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ my $package_url = "http://www.cpan.org/modules/$package";
172172
my $package_file = "$tmpdir/$package"; # this is a cache
173173

174174
my @problematic = (
175-
'podlators', # weird CUSTOMIZED section due to .PL files
175+
# no current entries as of perl-5.37.7 (Dec 2022)
176176
);
177177

178178

cpan/podlators/Makefile.PL

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# which only supports that build method, and because it is a dependency of
55
# other build systems like Module::Build.
66
#
7-
# Copyright 1999-2001, 2008, 2010, 2012, 2014-2016, 2018-2019
7+
# Copyright 1999-2001, 2008, 2010, 2012, 2014-2016, 2018-2019, 2022
88
# Russ Allbery <rra@cpan.org>
99
#
1010
# This program is free software; you may redistribute it and/or modify it
@@ -30,7 +30,7 @@ sub dist_version {
3030
open(my $fh, '<', File::Spec->catfile('lib', 'Pod', 'Man.pm'))
3131
or die "$0: cannot open lib/Pod/Man.pm: $!\n";
3232
while (defined(my $line = <$fh>)) {
33-
if ($line =~ m{ \A \$VERSION \s+ = \s+ '([^\']+)' }xms) {
33+
if ($line =~ m{ \A (?:our \s+)? \$VERSION \s+ = \s+ '([^\']+)' }xms) {
3434
close($fh) or die "$0: cannot close lib/Pod/Man.pm\n";
3535
return $1;
3636
}
@@ -89,7 +89,7 @@ my %metadata = (
8989
LICENSE => 'perl_5',
9090
EXE_FILES => [scripts('pod2text', 'pod2man')],
9191
VERSION_FROM => 'lib/Pod/Man.pm',
92-
MIN_PERL_VERSION => '5.008',
92+
MIN_PERL_VERSION => '5.010',
9393

9494
# Use *.PL files to generate the driver scripts so that we get the correct
9595
# invocation of Perl on non-UNIX platforms.

cpan/podlators/docs/docknot.yaml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Package metadata for podlators.
2+
#
3+
# This file contains configuration for DocKnot used to generate
4+
# documentation files (like README.md) and web pages. Other documentation
5+
# in this package is generated automatically from these files as part of
6+
# the release process. For more information, see DocKnot's documentation.
7+
#
8+
# DocKnot is available from <https://www.eyrie.org/~eagle/software/docknot/>.
9+
#
10+
# Copyright 1999-2010, 2012-2022 Russ Allbery <rra@cpan.org>
11+
#
12+
# SPDX-License-Identifier: MIT
13+
14+
format: v1
15+
16+
name: podlators
17+
maintainer: Russ Allbery <rra@cpan.org>
18+
version: '5.00'
19+
synopsis: format POD source into various output formats
20+
21+
license:
22+
name: Perl
23+
copyrights:
24+
- holder: Russ Allbery <rra@cpan.org>
25+
years: 1999-2010, 2012-2022
26+
27+
build:
28+
type: ExtUtils::MakeMaker
29+
distribution:
30+
cpan: podlators
31+
section: perl
32+
tarname: podlators
33+
version: podlators
34+
support:
35+
email: rra@cpan.org
36+
github: rra/podlators
37+
web: https://www.eyrie.org/~eagle/software/podlators/
38+
vcs:
39+
browse: https://git.eyrie.org/?p=perl/podlators.git
40+
github: rra/podlators
41+
openhub: https://www.openhub.net/p/podlators
42+
status:
43+
workflow: build
44+
type: Git
45+
url: https://git.eyrie.org/git/perl/podlators.git
46+
47+
quote:
48+
author: Robert Fripp
49+
text: |
50+
We move from making unnecessary efforts, the exertions of force, to making
51+
necessary efforts: the direction of effortlessness. In this the prime
52+
maxim is: honor necessity, honor sufficiency.
53+
work: '"The Road to Graceland"'
54+
docs:
55+
api:
56+
- name: pod-man
57+
title: Pod::Man
58+
- name: pod-text
59+
title: Pod::Text
60+
- name: pod-text-color
61+
title: Pod::Text::Color
62+
- name: pod-text-overstrike
63+
title: Pod::Text::Overstrike
64+
- name: pod-text-termcap
65+
title: Pod::Text::Termcap
66+
developer:
67+
- name: todo
68+
title: To-do list
69+
user:
70+
- name: perlpodstyle
71+
title: POD style guide
72+
- name: pod2man
73+
title: pod2man documentation
74+
- name: pod2text
75+
title: pod2text documentation
76+
- name: thanks
77+
title: Thanks and credits
78+
79+
blurb: |
80+
podlators contains Pod::Man and Pod::Text modules which convert POD input to
81+
*roff source output, suitable for man pages, or plain text. It also
82+
includes several subclasses of Pod::Text for formatted output to terminals
83+
with various capabilities. It is the source package for the Pod::Man and
84+
Pod::Text modules included with Perl.
85+
86+
description: |
87+
POD is the Plain Old Documentation format, the documentation language used
88+
for all of Perl's documentation. I learned it to document Perl modules,
89+
started using it for Perl scripts as well, and discovered it was the most
90+
convenient way I've found to write program documentation. It's extremely
91+
simple, well-designed for writing Unix manual pages (and I'm a
92+
traditionalist who thinks that any program should have a regular manual
93+
page), and easily readable in the raw format by humans.
94+
95+
The translators into text and nroff (for manual pages) included in the Perl
96+
distribution had various bugs, however, and used their own ad hoc parsers,
97+
so when I started running into those bugs and when a new generic parser
98+
(Pod::Parser) was written, I decided to rewrite the two translators that I
99+
use the most and fix the bugs that were bothering me. This package is the
100+
result.
101+
102+
podlators contains two main modules, Pod::Man and Pod::Text. The former
103+
converts POD into nroff/troff source and the latter into plain text (with
104+
various options controlling some of the formatting). There are also several
105+
subclasses of Pod::Text for generating slightly formatted text using color
106+
or other terminal control escapes, and a general utility module,
107+
Pod::ParseLink, for parsing the POD `L<>` formatting sequences. Also
108+
included in this package are the `pod2text` and `pod2man` driver scripts.
109+
110+
Both Pod::Text and Pod::Man provide a variety of options for fine-tuning
111+
their output. Pod::Man also tries to massage input text where appropriate
112+
to produce better output when run through nroff or troff, such as
113+
distinguishing between different types of hyphens.
114+
115+
As of Perl 5.6.0, my implementation was included in Perl core, and each
116+
release of Perl will have the at-the-time most current version of podlators
117+
included. You therefore only need to install this package yourself if you
118+
need a newer version than came with Perl (to get some bug fixes, for
119+
example).
120+
121+
requirements: |
122+
This module requires Perl 5.10 or later.
123+
124+
The troff/nroff generated by Pod::Man should be compatible with any troff or
125+
nroff implementation with the `-man` macro set, including mandoc. It is
126+
primarily tested by me under GNU groff, but Perl users send bug reports for
127+
a wide variety of implementations and Pod::Man is used to generate all of
128+
Perl's own manual pages, so hopefully most of the bugs have been weeded out.
129+
130+
test:
131+
lancaster: true
132+
suffix: |
133+
The following additional Perl modules will be used by the test suite if
134+
present:
135+
136+
* Test::CPAN::Changes (part of CPAN-Changes)
137+
* Test::MinimumVersion
138+
* Test::Pod
139+
* Test::Spelling
140+
* Test::Strict
141+
* Test::Synopsis
142+
143+
All are available on CPAN. Those tests will be skipped if the modules are
144+
not available.

0 commit comments

Comments
 (0)