diff --git a/MANIFEST b/MANIFEST index 985ca37b96df..170badb73fb6 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2031,7 +2031,7 @@ cpan/Pod-Usage/t/pod/testcmp.pl cpan/Pod-Usage/t/pod/testp2pt.pl cpan/Pod-Usage/t/pod/usage.pod cpan/Pod-Usage/t/pod/usage2.pod -cpan/podlators/docs/docknot.yaml +cpan/podlators/docs/docknot.yaml podlators cpan/podlators/lib/Pod/Man.pm Convert POD data to *roff cpan/podlators/lib/Pod/ParseLink.pm Perl an L<> formatting code in POD text cpan/podlators/lib/Pod/Text.pm Pod-Parser - convert POD data to formatted ASCII text @@ -2047,127 +2047,132 @@ cpan/podlators/t/data/basic.man podlators test cpan/podlators/t/data/basic.ovr podlators test cpan/podlators/t/data/basic.pod podlators test cpan/podlators/t/data/basic.txt podlators test -cpan/podlators/t/data/man/encoding.groff -cpan/podlators/t/data/man/encoding.pod -cpan/podlators/t/data/man/encoding.roff -cpan/podlators/t/data/man/encoding.utf8 +cpan/podlators/t/data/man/encoding.groff podlators +cpan/podlators/t/data/man/encoding.pod podlators +cpan/podlators/t/data/man/encoding.roff podlators +cpan/podlators/t/data/man/encoding.utf8 podlators cpan/podlators/t/data/perl.conf podlators test -cpan/podlators/t/data/perlcriticrc -cpan/podlators/t/data/perltidyrc -cpan/podlators/t/data/regenerate-data -cpan/podlators/t/data/snippets/color/escape-wrapping -cpan/podlators/t/data/snippets/color/tag-width -cpan/podlators/t/data/snippets/color/tag-wrapping -cpan/podlators/t/data/snippets/color/width -cpan/podlators/t/data/snippets/color/wrapping -cpan/podlators/t/data/snippets/man/agrave -cpan/podlators/t/data/snippets/man/backslash-man-ref -cpan/podlators/t/data/snippets/man/bullet-after-nonbullet -cpan/podlators/t/data/snippets/man/bullets -cpan/podlators/t/data/snippets/man/c-in-header -cpan/podlators/t/data/snippets/man/c-in-name -cpan/podlators/t/data/snippets/man/cpp -cpan/podlators/t/data/snippets/man/dollar-magic -cpan/podlators/t/data/snippets/man/error-die -cpan/podlators/t/data/snippets/man/error-none -cpan/podlators/t/data/snippets/man/error-normal -cpan/podlators/t/data/snippets/man/error-pod -cpan/podlators/t/data/snippets/man/error-stderr -cpan/podlators/t/data/snippets/man/error-stderr-opt -cpan/podlators/t/data/snippets/man/eth -cpan/podlators/t/data/snippets/man/fixed-font -cpan/podlators/t/data/snippets/man/fixed-font-in-item -cpan/podlators/t/data/snippets/man/for-blocks -cpan/podlators/t/data/snippets/man/guesswork -cpan/podlators/t/data/snippets/man/guesswork-all -cpan/podlators/t/data/snippets/man/guesswork-no-quoting -cpan/podlators/t/data/snippets/man/guesswork-none -cpan/podlators/t/data/snippets/man/guesswork-partial -cpan/podlators/t/data/snippets/man/guesswork-quoting -cpan/podlators/t/data/snippets/man/hyphen-in-s -cpan/podlators/t/data/snippets/man/iso-8859-1 -cpan/podlators/t/data/snippets/man/iso-8859-1-error-die -cpan/podlators/t/data/snippets/man/iso-8859-1-error-pod -cpan/podlators/t/data/snippets/man/iso-8859-1-roff -cpan/podlators/t/data/snippets/man/item-fonts -cpan/podlators/t/data/snippets/man/language -cpan/podlators/t/data/snippets/man/link-quoting -cpan/podlators/t/data/snippets/man/link-to-url -cpan/podlators/t/data/snippets/man/long-quote -cpan/podlators/t/data/snippets/man/lquote-and-quote -cpan/podlators/t/data/snippets/man/lquote-rquote -cpan/podlators/t/data/snippets/man/markup-in-name -cpan/podlators/t/data/snippets/man/multiline-x -cpan/podlators/t/data/snippets/man/naive -cpan/podlators/t/data/snippets/man/naive-groff -cpan/podlators/t/data/snippets/man/name-guesswork -cpan/podlators/t/data/snippets/man/name-quotes -cpan/podlators/t/data/snippets/man/name-quotes-none -cpan/podlators/t/data/snippets/man/nested-lists -cpan/podlators/t/data/snippets/man/newlines-in-c -cpan/podlators/t/data/snippets/man/non-ascii -cpan/podlators/t/data/snippets/man/nonbreaking-space-l -cpan/podlators/t/data/snippets/man/not-bullet -cpan/podlators/t/data/snippets/man/not-numbers -cpan/podlators/t/data/snippets/man/nourls -cpan/podlators/t/data/snippets/man/periods -cpan/podlators/t/data/snippets/man/quote-escaping -cpan/podlators/t/data/snippets/man/rquote-none -cpan/podlators/t/data/snippets/man/soft-hyphens -cpan/podlators/t/data/snippets/man/trailing-space -cpan/podlators/t/data/snippets/man/true-false -cpan/podlators/t/data/snippets/man/utf8-nonbreaking -cpan/podlators/t/data/snippets/man/utf8-verbatim -cpan/podlators/t/data/snippets/man/x-whitespace -cpan/podlators/t/data/snippets/man/x-whitespace-entry -cpan/podlators/t/data/snippets/man/zero-width-space -cpan/podlators/t/data/snippets/overstrike/tag-width -cpan/podlators/t/data/snippets/overstrike/wrapping -cpan/podlators/t/data/snippets/README.md -cpan/podlators/t/data/snippets/termcap/escape-wrapping -cpan/podlators/t/data/snippets/termcap/tag-width -cpan/podlators/t/data/snippets/termcap/tag-wrapping -cpan/podlators/t/data/snippets/termcap/term-unknown -cpan/podlators/t/data/snippets/termcap/width -cpan/podlators/t/data/snippets/termcap/wrapping -cpan/podlators/t/data/snippets/text/alt -cpan/podlators/t/data/snippets/text/c-with-spaces -cpan/podlators/t/data/snippets/text/code +cpan/podlators/t/data/perlcriticrc podlators +cpan/podlators/t/data/perltidyrc podlators +cpan/podlators/t/data/regenerate-data podlators +cpan/podlators/t/data/snippets/color/escape-wrapping podlators +cpan/podlators/t/data/snippets/color/nonbreaking-wrap podlators +cpan/podlators/t/data/snippets/color/tag-width podlators +cpan/podlators/t/data/snippets/color/tag-wrapping podlators +cpan/podlators/t/data/snippets/color/width podlators +cpan/podlators/t/data/snippets/color/wrapping podlators +cpan/podlators/t/data/snippets/man/agrave podlators +cpan/podlators/t/data/snippets/man/backslash-man-ref podlators +cpan/podlators/t/data/snippets/man/bullet-after-nonbullet podlators +cpan/podlators/t/data/snippets/man/bullets podlators +cpan/podlators/t/data/snippets/man/c-in-header podlators +cpan/podlators/t/data/snippets/man/c-in-name podlators +cpan/podlators/t/data/snippets/man/cpp podlators +cpan/podlators/t/data/snippets/man/dollar-magic podlators +cpan/podlators/t/data/snippets/man/error-die podlators +cpan/podlators/t/data/snippets/man/error-none podlators +cpan/podlators/t/data/snippets/man/error-normal podlators +cpan/podlators/t/data/snippets/man/error-pod podlators +cpan/podlators/t/data/snippets/man/error-stderr podlators +cpan/podlators/t/data/snippets/man/error-stderr-opt podlators +cpan/podlators/t/data/snippets/man/eth podlators +cpan/podlators/t/data/snippets/man/fixed-font podlators +cpan/podlators/t/data/snippets/man/fixed-font-in-item podlators +cpan/podlators/t/data/snippets/man/for-blocks podlators +cpan/podlators/t/data/snippets/man/guesswork podlators +cpan/podlators/t/data/snippets/man/guesswork-all podlators +cpan/podlators/t/data/snippets/man/guesswork-no-quoting podlators +cpan/podlators/t/data/snippets/man/guesswork-none podlators +cpan/podlators/t/data/snippets/man/guesswork-partial podlators +cpan/podlators/t/data/snippets/man/guesswork-quoting podlators +cpan/podlators/t/data/snippets/man/iso-8859-1 podlators +cpan/podlators/t/data/snippets/man/iso-8859-1-error-die podlators +cpan/podlators/t/data/snippets/man/iso-8859-1-error-pod podlators +cpan/podlators/t/data/snippets/man/iso-8859-1-roff podlators +cpan/podlators/t/data/snippets/man/item-fonts podlators +cpan/podlators/t/data/snippets/man/item-spacing podlators +cpan/podlators/t/data/snippets/man/language podlators +cpan/podlators/t/data/snippets/man/link-quoting podlators +cpan/podlators/t/data/snippets/man/link-to-url podlators +cpan/podlators/t/data/snippets/man/long-quote podlators +cpan/podlators/t/data/snippets/man/lquote-and-quote podlators +cpan/podlators/t/data/snippets/man/lquote-rquote podlators +cpan/podlators/t/data/snippets/man/man-l podlators +cpan/podlators/t/data/snippets/man/markup-in-name podlators +cpan/podlators/t/data/snippets/man/multiline-x podlators +cpan/podlators/t/data/snippets/man/naive podlators +cpan/podlators/t/data/snippets/man/naive-groff podlators +cpan/podlators/t/data/snippets/man/name-guesswork podlators +cpan/podlators/t/data/snippets/man/name-quotes podlators +cpan/podlators/t/data/snippets/man/name-quotes-none podlators +cpan/podlators/t/data/snippets/man/nested-lists podlators +cpan/podlators/t/data/snippets/man/newlines-in-c podlators +cpan/podlators/t/data/snippets/man/non-ascii podlators +cpan/podlators/t/data/snippets/man/nonbreaking-space-l podlators +cpan/podlators/t/data/snippets/man/not-bullet podlators +cpan/podlators/t/data/snippets/man/not-numbers podlators +cpan/podlators/t/data/snippets/man/nourls podlators +cpan/podlators/t/data/snippets/man/periods podlators +cpan/podlators/t/data/snippets/man/quote-escaping podlators +cpan/podlators/t/data/snippets/man/rquote-none podlators +cpan/podlators/t/data/snippets/man/soft-hyphens podlators +cpan/podlators/t/data/snippets/man/trailing-space podlators +cpan/podlators/t/data/snippets/man/true-false podlators +cpan/podlators/t/data/snippets/man/utf8-nonbreaking podlators +cpan/podlators/t/data/snippets/man/utf8-verbatim podlators +cpan/podlators/t/data/snippets/man/x-whitespace podlators +cpan/podlators/t/data/snippets/man/x-whitespace-entry podlators +cpan/podlators/t/data/snippets/man/zero-width-space podlators +cpan/podlators/t/data/snippets/overstrike/nonbreaking-wrap podlators +cpan/podlators/t/data/snippets/overstrike/tag-width podlators +cpan/podlators/t/data/snippets/overstrike/wrapping podlators +cpan/podlators/t/data/snippets/README.md podlators +cpan/podlators/t/data/snippets/termcap/escape-wrapping podlators +cpan/podlators/t/data/snippets/termcap/nonbreaking-wrap podlators +cpan/podlators/t/data/snippets/termcap/tag-width podlators +cpan/podlators/t/data/snippets/termcap/tag-wrapping podlators +cpan/podlators/t/data/snippets/termcap/term-unknown podlators +cpan/podlators/t/data/snippets/termcap/width podlators +cpan/podlators/t/data/snippets/termcap/wrapping podlators +cpan/podlators/t/data/snippets/text/alt podlators +cpan/podlators/t/data/snippets/text/c-with-spaces podlators +cpan/podlators/t/data/snippets/text/code podlators cpan/podlators/t/data/snippets/text/cpp podlators test -cpan/podlators/t/data/snippets/text/empty -cpan/podlators/t/data/snippets/text/error-die -cpan/podlators/t/data/snippets/text/error-none -cpan/podlators/t/data/snippets/text/error-normal -cpan/podlators/t/data/snippets/text/error-pod -cpan/podlators/t/data/snippets/text/error-stderr -cpan/podlators/t/data/snippets/text/error-stderr-opt -cpan/podlators/t/data/snippets/text/for -cpan/podlators/t/data/snippets/text/guesswork-no-quoting -cpan/podlators/t/data/snippets/text/guesswork-quoting -cpan/podlators/t/data/snippets/text/iso-8859-1 -cpan/podlators/t/data/snippets/text/iso-8859-1-error-die -cpan/podlators/t/data/snippets/text/iso-8859-1-error-pod -cpan/podlators/t/data/snippets/text/iso-8859-1-utf8 -cpan/podlators/t/data/snippets/text/late-encoding -cpan/podlators/t/data/snippets/text/link-rt -cpan/podlators/t/data/snippets/text/link-url -cpan/podlators/t/data/snippets/text/margin -cpan/podlators/t/data/snippets/text/naive -cpan/podlators/t/data/snippets/text/name-quotes -cpan/podlators/t/data/snippets/text/name-quotes-none -cpan/podlators/t/data/snippets/text/non-latin -cpan/podlators/t/data/snippets/text/nonbreaking-space -cpan/podlators/t/data/snippets/text/nonbreaking-space-l -cpan/podlators/t/data/snippets/text/nourls -cpan/podlators/t/data/snippets/text/periods -cpan/podlators/t/data/snippets/text/quotes-opt -cpan/podlators/t/data/snippets/text/s-whitespace -cpan/podlators/t/data/snippets/text/sentence-spacing -cpan/podlators/t/data/snippets/text/utf8 -cpan/podlators/t/data/snippets/text/utf8-iso -cpan/podlators/t/data/snippets/text/verbatim +cpan/podlators/t/data/snippets/text/empty podlators +cpan/podlators/t/data/snippets/text/error-die podlators +cpan/podlators/t/data/snippets/text/error-none podlators +cpan/podlators/t/data/snippets/text/error-normal podlators +cpan/podlators/t/data/snippets/text/error-pod podlators +cpan/podlators/t/data/snippets/text/error-stderr podlators +cpan/podlators/t/data/snippets/text/error-stderr-opt podlators +cpan/podlators/t/data/snippets/text/for podlators +cpan/podlators/t/data/snippets/text/guesswork-no-quoting podlators +cpan/podlators/t/data/snippets/text/guesswork-quoting podlators +cpan/podlators/t/data/snippets/text/iso-8859-1 podlators +cpan/podlators/t/data/snippets/text/iso-8859-1-error-die podlators +cpan/podlators/t/data/snippets/text/iso-8859-1-error-pod podlators +cpan/podlators/t/data/snippets/text/iso-8859-1-utf8 podlators +cpan/podlators/t/data/snippets/text/late-encoding podlators +cpan/podlators/t/data/snippets/text/link-rt podlators +cpan/podlators/t/data/snippets/text/link-url podlators +cpan/podlators/t/data/snippets/text/margin podlators +cpan/podlators/t/data/snippets/text/naive podlators +cpan/podlators/t/data/snippets/text/name-quotes podlators +cpan/podlators/t/data/snippets/text/name-quotes-none podlators +cpan/podlators/t/data/snippets/text/non-latin podlators +cpan/podlators/t/data/snippets/text/nonbreaking-space podlators +cpan/podlators/t/data/snippets/text/nonbreaking-space-l podlators +cpan/podlators/t/data/snippets/text/nonbreaking-wrap podlators +cpan/podlators/t/data/snippets/text/nourls podlators +cpan/podlators/t/data/snippets/text/periods podlators +cpan/podlators/t/data/snippets/text/quotes-opt podlators +cpan/podlators/t/data/snippets/text/s-whitespace podlators +cpan/podlators/t/data/snippets/text/sentence-spacing podlators +cpan/podlators/t/data/snippets/text/utf8 podlators +cpan/podlators/t/data/snippets/text/utf8-iso podlators +cpan/podlators/t/data/snippets/text/verbatim podlators cpan/podlators/t/data/termcap podlators test -cpan/podlators/t/docs/changes.t +cpan/podlators/t/docs/changes.t Test file related to podlators cpan/podlators/t/docs/pod.t podlators test cpan/podlators/t/docs/pod-spelling.t podlators test cpan/podlators/t/docs/spdx-license.t podlators test @@ -2182,26 +2187,26 @@ cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm podlators test cpan/podlators/t/man/devise-date.t podlators test cpan/podlators/t/man/devise-title.t podlators test cpan/podlators/t/man/empty.t podlators test -cpan/podlators/t/man/encoding.t +cpan/podlators/t/man/encoding.t Test file related to podlators cpan/podlators/t/man/heading.t podlators test cpan/podlators/t/man/iso-8859-1.t podlators test cpan/podlators/t/man/no-encode.t podlators test cpan/podlators/t/man/snippets.t podlators test cpan/podlators/t/man/utf8-io.t podlators test cpan/podlators/t/parselink/basic.t podlators test -cpan/podlators/t/style/critic.t -cpan/podlators/t/style/kwalitee.t +cpan/podlators/t/style/critic.t Test file related to podlators +cpan/podlators/t/style/kwalitee.t Test file related to podlators cpan/podlators/t/style/minimum-version.t podlators test cpan/podlators/t/style/module-version.t podlators test -cpan/podlators/t/style/obsolete-strings.t +cpan/podlators/t/style/obsolete-strings.t Test file related to podlators cpan/podlators/t/style/strict.t podlators test cpan/podlators/t/text/color.t podlators test -cpan/podlators/t/text/invalid.t -cpan/podlators/t/text/iso-8859-1.t +cpan/podlators/t/text/invalid.t Test file related to podlators +cpan/podlators/t/text/iso-8859-1.t Test file related to podlators cpan/podlators/t/text/overstrike.t podlators test -cpan/podlators/t/text/snippets.t +cpan/podlators/t/text/snippets.t Test file related to podlators cpan/podlators/t/text/termcap.t podlators test -cpan/podlators/t/text/utf8-io.t +cpan/podlators/t/text/utf8-io.t Test file related to podlators cpan/Scalar-List-Utils/lib/List/Util.pm List::Util cpan/Scalar-List-Utils/lib/List/Util/XS.pm List::Util cpan/Scalar-List-Utils/lib/Scalar/Util.pm Scalar::Util diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index f90455ce23e8..f1466928d4cf 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -981,22 +981,14 @@ package Maintainers; }, 'podlators' => { - 'DISTRIBUTION' => 'RRA/podlators-5.01.tar.gz', + 'DISTRIBUTION' => 'RRA/podlators-v6.0.2.tar.gz', + 'SYNCINFO' => 'jkeenan on Sun Jul 14 20:06:07 2024', 'MAIN_MODULE' => 'Pod::Man', 'FILES' => q[cpan/podlators pod/perlpodstyle.pod], 'EXCLUDED' => [ qr{^\.github/dependabot\.yml}, qr{^\.github/workflows/build\.yaml}, ], - 'CUSTOMIZED' => [ - # https://github.com/rra/podlators/pull/28 - 'lib/Pod/Man.pm', - 'lib/Pod/ParseLink.pm', - 'lib/Pod/Text.pm', - 'lib/Pod/Text/Color.pm', - 'lib/Pod/Text/Overstrike.pm', - 'lib/Pod/Text/Termcap.pm' - ], 'MAP' => { '' => 'cpan/podlators/', # this file lives outside the cpan/ directory diff --git a/cpan/podlators/Makefile.PL b/cpan/podlators/Makefile.PL index 36e47ab18dc9..d654ea806d79 100644 --- a/cpan/podlators/Makefile.PL +++ b/cpan/podlators/Makefile.PL @@ -4,7 +4,7 @@ # which only supports that build method, and because it is a dependency of # other build systems like Module::Build. # -# Copyright 1999-2001, 2008, 2010, 2012, 2014-2016, 2018-2019, 2022 +# Copyright 1999-2001, 2008, 2010, 2012, 2014-2016, 2018-2019, 2022, 2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it @@ -12,30 +12,30 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +# Do not use autodie here. When podlators is built as part of Perl core, it +# is built before autodie is available. +use 5.012; use warnings; use Config; use ExtUtils::MakeMaker; use File::Spec; -# Determine the version of the distribution so that we can construct the -# provides metadata that unfortunately ExtUtils::MakeMaker does not build. -# This is a very simple $VERSION parser, since it only has to handle the -# syntax Pod::Man uses. +# Determine the version of the distribution, since we need it outside of +# ExtUtils::MakeMaker to add some additional metadata. This is a very simple +# parser since it only has to handle the syntax my modules use. # # Returns: Distribution version as a string sub dist_version { - open(my $fh, '<', File::Spec->catfile('lib', 'Pod', 'Man.pm')) - or die "$0: cannot open lib/Pod/Man.pm: $!\n"; + my ($path) = @_; + open(my $fh, '<', $path) or die "$0: cannot open $path: $!\n"; while (defined(my $line = <$fh>)) { - if ($line =~ m{ \A (?:our \s+)? \$VERSION \s+ = \s+ '([^\']+)' }xms) { - close($fh) or die "$0: cannot close lib/Pod/Man.pm\n"; + if ($line =~ m{ \A package \s+ \S+ \s+ (v[\d.]+) }xms) { + close($fh) or die "$0: cannot close $path: $!\n"; return $1; } } - close($fh) or die "$0: cannot close lib/Pod/Man.pm\n"; + close($fh) or die "$0: cannot close $path: $!\n"; die "$0: cannot find version in lib/Pod/Man.pm\n"; } @@ -45,15 +45,14 @@ sub dist_version { # # @scripts - List of script names # -# Returns: (Array) List of relative paths from top of distribution -# (Scalar) Space-separated relative paths from top of distribution +# Returns: List of relative paths from top of distribution sub scripts { my (@scripts) = @_; my @paths = map { File::Spec->catfile('scripts', $_) } @scripts; if ($^O eq 'VMS') { @paths = map { m{ [.] PL \z }xms ? $_ : $_ . '.com' } @paths; } - return wantarray ? @paths : join(q{ }, @paths); + return @paths; } # Generate an association between a source file and a destination man page for @@ -80,18 +79,16 @@ sub man1pod { # The hash of all the metadata. This will be modified before WriteMakefile to # remove keys not supported by the local version of ExtUtils::MakeMaker. -my $dist_version = dist_version(); +my $dist_version = dist_version(File::Spec->catfile(qw(lib Pod Man.pm))); my %metadata = ( - #<<< NAME => 'Pod', DISTNAME => 'podlators', ABSTRACT => 'Convert POD data to various other formats', AUTHOR => 'Russ Allbery ', LICENSE => 'perl_5', EXE_FILES => [scripts('pod2text', 'pod2man')], - VERSION_FROM => 'lib/Pod/Man.pm', - MIN_PERL_VERSION => '5.010', - #>>> + VERSION => $dist_version, + MIN_PERL_VERSION => '5.012', # Use *.PL files to generate the driver scripts so that we get the correct # invocation of Perl on non-UNIX platforms. @@ -109,8 +106,8 @@ my %metadata = ( }, # Clean some additional files. - clean => { FILES => File::Spec->catdir('t', 'tmp') }, - realclean => { FILES => scalar(scripts('pod2text', 'pod2man')) }, + clean => { FILES => File::Spec->catdir('t', 'tmp') }, + realclean => { FILES => join(q{ }, scripts('pod2text', 'pod2man')) }, # Dependencies on other modules. PREREQ_PM => { 'Pod::Simple' => 3.26 }, @@ -119,37 +116,32 @@ my %metadata = ( # directories by default. test => { TESTS => 't/*/*.t' }, - # For older versions of Perl, we have to force installation into the Perl - # module directories since site modules did not take precedence over core - # modules. - INSTALLDIRS => $] lt '5.011' ? 'perl' : 'site', - # Additional metadata. META_ADD => { 'meta-spec' => { version => 2 }, - provides => { + provides => { 'Pod::Man' => { - file => 'lib/Pod/Man.pm', + file => 'lib/Pod/Man.pm', version => $dist_version, }, 'Pod::ParseLink' => { - file => 'lib/Pod/ParseLink.pm', + file => 'lib/Pod/ParseLink.pm', version => $dist_version, }, 'Pod::Text' => { - file => 'lib/Pod/Text.pm', + file => 'lib/Pod/Text.pm', version => $dist_version, }, 'Pod::Text::Color' => { - file => 'lib/Pod/Text/Color.pm', + file => 'lib/Pod/Text/Color.pm', version => $dist_version, }, 'Pod::Text::Overstrike' => { - file => 'lib/Pod/Text/Overstrike.pm', + file => 'lib/Pod/Text/Overstrike.pm', version => $dist_version, }, 'Pod::Text::Termcap' => { - file => 'lib/Pod/Text/Termcap.pm', + file => 'lib/Pod/Text/Termcap.pm', version => $dist_version, }, }, @@ -157,10 +149,10 @@ my %metadata = ( bugtracker => { web => 'https://github.com/rra/podlators/issues', }, - homepage => 'https://www.eyrie.org/~eagle/software/podlators/', + homepage => 'https://www.eyrie.org/~eagle/software/podlators/', repository => { - url => 'https://github.com/rra/podlators.git', - web => 'https://github.com/rra/podlators', + url => 'https://github.com/rra/podlators.git', + web => 'https://github.com/rra/podlators', type => 'git', }, }, @@ -170,8 +162,8 @@ my %metadata = ( # Remove keys that aren't supported by this version of ExtUtils::MakeMaker. # This hash maps keys to the minimum supported version. my %supported = ( - LICENSE => 6.31, - META_ADD => 6.46, + LICENSE => 6.31, + META_ADD => 6.46, MIN_PERL_VERSION => 6.48, ); for my $key (keys(%supported)) { diff --git a/cpan/podlators/docs/docknot.yaml b/cpan/podlators/docs/docknot.yaml index 024963750166..6df3dfe7c2fb 100644 --- a/cpan/podlators/docs/docknot.yaml +++ b/cpan/podlators/docs/docknot.yaml @@ -15,14 +15,14 @@ format: v1 name: podlators maintainer: Russ Allbery -version: '5.01' +version: v6.0.2 synopsis: format POD source into various output formats license: name: Perl copyrights: - holder: Russ Allbery - years: 1999-2010, 2012-2022 + years: 1999-2024 build: type: ExtUtils::MakeMaker @@ -31,10 +31,15 @@ distribution: section: perl tarname: podlators version: podlators + ignore: + - .github/dependabot.yml + - .github/workflows/build.yaml support: email: rra@cpan.org github: rra/podlators web: https://www.eyrie.org/~eagle/software/podlators/ + listname: pod-people + listurl: https://lists.perl.org/list/pod-people.html vcs: browse: https://git.eyrie.org/?p=perl/podlators.git github: rra/podlators @@ -119,7 +124,7 @@ description: | example). requirements: | - This module requires Perl 5.10 or later and Pod::Simple 3.26 or later. + This module requires Perl 5.12 or later and Pod::Simple 3.26 or later. (Pod::Simple 3.26 was included in Perl 5.17.10.) The troff/nroff generated by Pod::Man should be compatible with any troff or @@ -135,7 +140,9 @@ test: present: * Test::CPAN::Changes (part of CPAN-Changes) + * Test::Kwalitee * Test::MinimumVersion + * Test::Perl::Critic * Test::Pod * Test::Spelling * Test::Strict diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm index 4a9f98a6354b..bfa2f74b51e8 100644 --- a/cpan/podlators/lib/Pod/Man.pm +++ b/cpan/podlators/lib/Pod/Man.pm @@ -12,36 +12,32 @@ # Modules and declarations ############################################################################## -package Pod::Man; +package Pod::Man v6.0.2; -use 5.010; -use strict; +use 5.012; +use parent qw(Pod::Simple); use warnings; use Carp qw(carp croak); -use Pod::Simple (); # Conditionally import Encode and set $HAS_ENCODE if it is available. This is # required to support building as part of Perl core, since podlators is built # before Encode is. my $HAS_ENCODE; + BEGIN { $HAS_ENCODE = eval { require Encode }; } -our @ISA = qw(Pod::Simple); -our $VERSION = '5.01_02'; -$VERSION =~ tr/_//d; - # Ensure that $Pod::Simple::nbsp and $Pod::Simple::shy are available. Code # taken from Pod::Simple 3.32, but was only added in 3.30. my ($NBSP, $SHY); if ($Pod::Simple::VERSION ge 3.30) { $NBSP = $Pod::Simple::nbsp; - $SHY = $Pod::Simple::shy; + $SHY = $Pod::Simple::shy; } else { - $NBSP = chr utf8::unicode_to_native(0xA0); - $SHY = chr utf8::unicode_to_native(0xAD); + $NBSP = chr(utf8::unicode_to_native(0xA0)); + $SHY = chr(utf8::unicode_to_native(0xAD)); } # Import the ASCII constant from Pod::Simple. This is true iff we're in an @@ -52,9 +48,7 @@ BEGIN { *ASCII = \&Pod::Simple::ASCII } # Formatting instructions for various types of blocks. cleanup makes hyphens # hard, adds spaces between consecutive underscores, and escapes backslashes. # convert translates characters into escapes. guesswork means to apply the -# transformations done by the guesswork sub (if enabled). literal says to -# protect literal quotes from being turned into UTF-8 quotes. By default, all -# transformations are on except literal, but some elements override. +# transformations done by the guesswork sub (if enabled). # # DEFAULT specifies the default settings. All other elements should list only # those settings that they are overriding. Data indicates =for roff blocks, @@ -62,13 +56,15 @@ BEGIN { *ASCII = \&Pod::Simple::ASCII } # # Formatting inherits negatively, in the sense that if the parent has turned # off guesswork, all child elements should leave it off. +#<<< my %FORMATTING = ( - DEFAULT => { cleanup => 1, convert => 1, guesswork => 1, literal => 0 }, - Data => { cleanup => 0, convert => 0, guesswork => 0, literal => 0 }, - Verbatim => { guesswork => 0, literal => 1 }, - C => { guesswork => 0, literal => 1 }, - X => { cleanup => 0, guesswork => 0 }, + DEFAULT => { cleanup => 1, convert => 1, guesswork => 1 }, + Data => { cleanup => 0, convert => 0, guesswork => 0 }, + Verbatim => { guesswork => 0 }, + C => { guesswork => 0 }, + X => { cleanup => 0, guesswork => 0 }, ); +#>>> # Try to map an encoding as understood by Perl Encode to an encoding # understood by groff's preconv. Encode doesn't care about hyphens or @@ -118,6 +114,7 @@ my %ENCODINGS = ( # This only works in an ASCII world. What to do in a non-ASCII world is very # unclear, so we just output what we get and hope for the best. my %ESCAPES; +#<<< @ESCAPES{0xA0 .. 0xFF} = ( $NBSP, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $SHY, undef, undef, @@ -137,6 +134,7 @@ my %ESCAPES; "\\*(d-", "n\\*~", "o\\*`", "o\\*'", "o\\*^", "o\\*~", "o\\*:", undef, "o\\*/" , "u\\*`", "u\\*'", "u\\*^", "u\\*:", "y\\*'", "\\*(th", "y\\*:", ) if ASCII; +#>>> ############################################################################## # Utility functions @@ -258,14 +256,12 @@ sub new { my $guesswork = $self->{opt_guesswork} || q{}; my %guesswork = map { $_ => 1 } split(m{,}xms, $guesswork); if (!%guesswork || $guesswork{all}) { - #<<< $$self{GUESSWORK} = { functions => 1, manref => 1, quoting => 1, variables => 1, }; - #>>> } elsif ($guesswork{none}) { $$self{GUESSWORK} = {}; } else { @@ -471,7 +467,6 @@ sub format_text { my $guesswork = $$options{guesswork} && !$$self{IN_NAME}; my $cleanup = $$options{cleanup}; my $convert = $$options{convert}; - my $literal = $$options{literal}; # Cleanup just tidies up a few things, telling *roff that the hyphens are # hard, putting a bit of space between consecutive underscores, escaping @@ -502,10 +497,8 @@ sub format_text { # Ensure that *roff doesn't convert literal quotes to UTF-8 single quotes, # but don't mess up accent escapes. - if ($literal) { - $text =~ s/(? at - # the end of a line. Reverse the text first, to avoid having to scan the - # entire paragraph. + # whitespace at the end, but leave Unicode whitespace (which includes the + # nonbreaking spaces from S<>). Reverse the text first, to avoid having + # to scan the entire paragraph. $text = reverse $text; - $text =~ s/\A\s*?(?= \\|\S|\z)/\n/; + $text =~ s{ \A [ \t\n]* }{\n}xms; $text = reverse $text; # Output the paragraph. @@ -1304,10 +1279,17 @@ sub cmd_x { return ''; } -# Links reduce to the text that we're given, wrapped in angle brackets if it's -# a URL, followed by the URL. We take an option to suppress the URL if anchor -# text is given. We need to format the "to" value of the link before -# comparing it to the text since we may escape hyphens. +# Pod::Man requires some special handling of links, so cannot treat it simply +# as a formatting directive all the time. +# +# For URL links, we want to show the URL itself in angle brackets, even +# (optionally) if there is anchor text. We need to format the "to" value of +# the link before comparing it to the text since we may escape hyphens. +# +# For man page links, we want to ensure that the entire man page reference is +# formatted like one, even if we normally wouldn't detect it as such. This +# means we can't use the formatting that Pod::Simple does for us, and instead +# need to do all of the formatting ourselves. sub cmd_l { my ($self, $attrs, $text) = @_; if ($$attrs{type} eq 'url') { @@ -1323,6 +1305,34 @@ sub cmd_l { } else { return "$text <$$attrs{to}>"; } + } elsif ($$attrs{type} eq 'man') { + if (not $$attrs{'content-implicit'}) { + return $text; + } + my $tag = $$self{PENDING}[-1]; + my $to = $$attrs{to}; + my $section = $$attrs{section}; + if ($section) { + $section = $self->format_text ($$tag[1], qq{"$section"}); + } + + # If the man reference cannot be parsed, just fall back on whatever + # Pod::Simple wants to do. + my ($page, $mansection) = $to =~ m{ \A (.*) \( ([^\)]+) \) \z }xms; + if (!defined($page) || !defined($mansection)) { + return $text; + } + + # Otherwise, do proper formatting, copying the normal output style of + # Pod::Simple. + $page = $self->format_text ($$tag[1], $page); + $mansection = $self->format_text ($$tag[1], $mansection); + $to = '\f(BS' . $page . '\f(BE\|' . "($mansection)"; + if (defined($section)) { + return "$section in $to"; + } else { + return $to; + } } else { return $text; } @@ -1374,6 +1384,14 @@ sub over_common_end { $$self{INDENT} = pop @{ $$self{INDENTS} }; pop @{ $$self{ITEMTYPES} }; + # If there were multiple =item tags in a row, none of which have bodies, + # we have disabled spacing with .PD 0 but have not set NEEDSPACE, so + # makespace will not turn spacing back on with .PD. We have to do that + # ourselves, and also reset the count of consecutive items since we've now + # left the block in which we were counting. + $self->output (".PD\n") if $$self{ITEMS} > 1; + $$self{ITEMS} = 0; + # If we emitted code for that indentation, end it. if (@{ $$self{SHIFTS} } > @{ $$self{INDENTS} }) { $self->output (".RE\n"); @@ -1391,14 +1409,16 @@ sub over_common_end { } # Dispatch the start and end calls as appropriate. -sub start_over_bullet { my $s = shift; $s->over_common_start ('bullet', @_) } -sub start_over_number { my $s = shift; $s->over_common_start ('number', @_) } -sub start_over_text { my $s = shift; $s->over_common_start ('text', @_) } -sub start_over_block { my $s = shift; $s->over_common_start ('block', @_) } -sub end_over_bullet { $_[0]->over_common_end } -sub end_over_number { $_[0]->over_common_end } -sub end_over_text { $_[0]->over_common_end } -sub end_over_block { $_[0]->over_common_end } +#<<< +sub start_over_bullet { my $s = shift; $s->over_common_start('bullet', @_) } +sub start_over_number { my $s = shift; $s->over_common_start('number', @_) } +sub start_over_text { my $s = shift; $s->over_common_start('text', @_) } +sub start_over_block { my $s = shift; $s->over_common_start('block', @_) } +sub end_over_bullet { my ($self) = @_; $self->over_common_end() } +sub end_over_number { my ($self) = @_; $self->over_common_end() } +sub end_over_text { my ($self) = @_; $self->over_common_end() } +sub end_over_block { my ($self) = @_; $self->over_common_end() } +#>>> # The common handler for all item commands. Takes the type of the item, the # attributes, and then the text of the item. @@ -1429,14 +1449,15 @@ sub item_common { # Take care of the indentation. If shifts and indents are equal, close # the top shift, since we're about to create an indentation with .IP. - # Also output .PD 0 to turn off spacing between items if this item is - # directly following another one. We only have to do that once for a - # whole chain of items so do it for the second item in the change. Note - # that makespace is what undoes this. if (@{ $$self{SHIFTS} } == @{ $$self{INDENTS} }) { $self->output (".RE\n"); pop @{ $$self{SHIFTS} }; } + + # Output .PD 0 to turn off spacing between items if this item is directly + # following another one. We only have to do that once for a whole chain + # of items so do it for the second item in the change. This is undone by + # makespace. $self->output (".PD 0\n") if ($$self{ITEMS} == 1); # Now, output the item tag itself. @@ -1457,10 +1478,12 @@ sub item_common { } # Dispatch the item commands to the appropriate place. -sub cmd_item_bullet { my $self = shift; $self->item_common ('bullet', @_) } -sub cmd_item_number { my $self = shift; $self->item_common ('number', @_) } -sub cmd_item_text { my $self = shift; $self->item_common ('text', @_) } -sub cmd_item_block { my $self = shift; $self->item_common ('block', @_) } +#<<< +sub cmd_item_bullet { my $self = shift; $self->item_common('bullet', @_) } +sub cmd_item_number { my $self = shift; $self->item_common('number', @_) } +sub cmd_item_text { my $self = shift; $self->item_common('text', @_) } +sub cmd_item_block { my $self = shift; $self->item_common('block', @_) } +#>>> ############################################################################## # Backward compatibility @@ -1597,8 +1620,10 @@ sub preamble_template { . \} .\} .rr rF +.\" +.\" Required to disable full justification in groff 1.23.0. +.if n .ds AD l ----END OF PREAMBLE---- -#'# for cperl-mode if ($$self{ENCODING} eq 'roff') { $preamble .= <<'----END OF PREAMBLE----' @@ -1665,7 +1690,7 @@ sub preamble_template { .\} .rm #[ #] #H #V #F C ----END OF PREAMBLE---- -#`# for cperl-mode + #`# for cperl-mode } return $preamble; } @@ -2298,13 +2323,21 @@ Pod::Man 4.10, included in Perl 5.27.8, changed the formatting for manual page references and function names to bold instead of italic, following the current Linux manual page standard. -Pod::Man 5.00 changed the default output encoding to UTF-8, overridable with -the new C option. It also fixed problems with bold or italic -extending too far when used with CZ<><> escapes, and began converting Unicode -zero-width spaces (U+200B) to the C<\:> *roff escape. It also dropped -attempts to add subtle formatting corrections in the output that would only be -visible when typeset with B, which had previously been a significant -source of bugs. +Pod::Man 5.00, included in Perl 5.37.7, changed the default output encoding to +UTF-8, overridable with the new C option. It also fixed problems +with bold or italic extending too far when used with CZ<><> escapes, and began +converting Unicode zero-width spaces (U+200B) to the C<\:> *roff escape. It +also dropped attempts to add subtle formatting corrections in the output that +would only be visible when typeset with B, which had previously been a +significant source of bugs. + +Pod::Man v6.0.0 and later unconditionally convert C<-> to the C<\-> *roff +escape, representing an ASCII hyphen-minus. Earlier versions attempted to use +heuristics to decide when a given C<-> character should translate to a +hyphen-minus or a true hyphen, but these heuristics were buggy and fragile. +v6.0.0 and later also unconditionally convert C<`> and C<'> to ASCII grave +accent and apostrophe marks instead of the default *roff behavior of +interpreting them as paired quotes. =head1 BUGS @@ -2349,11 +2382,34 @@ ends in a period or similar sentence-ending paragraph. Otherwise, B will add a two spaces after that sentence when reflowing, and your output document will have inconsistent spacing. -=head2 Hyphens - -The handling of hyphens versus dashes is somewhat fragile, and one may get a -the wrong one under some circumstances. This will normally only matter for -line breaking and possibly for troff output. +=head2 Hyphens and quotes + +The *roff language distinguishes between two types of hyphens: C<->, which is +a true typesetting hyphen (roughly equivalent to the Unicode U+2010 code +point), and C<\->, which is the ASCII hyphen-minus (U+002D) that is used for +UNIX command options and most filenames. Hyphens, where appropriate, produce +better typesetting, but incorrectly using them for command names and options +can cause problems with searching and cut-and-paste. + +POD does not draw this distinction. Before podlators v6.0.0, Pod::Man +attempted to translate C<-> in the input into either a hyphen or a +hyphen-minus, depending on context. However, this distinction proved +impossible to do correctly with heuristics. Pod::Man therefore translates all +C<-> characters in the input to C<\-> in the output, ensuring that command +names and options are correct at the cost of somewhat inferior typesetting and +line breaking issues with long hyphenated phrases. + +To use true hyphens in the Pod::Man output, declare an input character set of +UTF-8 (or some other Unicode encoding) and use Unicode hyphens. Pod::Man and +*roff should handle those correctly with the default output format and most +modern *roff implementations. + +Similarly, Pod::Man disables the default *roff behavior of turning C<`> and +C<'> characters into matched quotes, and pairs of those characters into +matched double quotes, because there is no good way to tell from the POD input +whether this interpretation is desired or whether the intent is to use a +literal grave accent or neutral apostrophe. If you want paired quotes in the +output, use Unicode and its paired quote characters. =head1 AUTHOR @@ -2366,7 +2422,7 @@ recognition and all bugs are mine. =head1 COPYRIGHT AND LICENSE -Copyright 1999-2010, 2012-2020, 2022 Russ Allbery +Copyright 1999-2020, 2022-2024 Russ Allbery Substantial contributions by Sean Burke . diff --git a/cpan/podlators/lib/Pod/ParseLink.pm b/cpan/podlators/lib/Pod/ParseLink.pm index 7fc42bd956c3..7b0fda34cc4e 100644 --- a/cpan/podlators/lib/Pod/ParseLink.pm +++ b/cpan/podlators/lib/Pod/ParseLink.pm @@ -11,18 +11,14 @@ # Modules and declarations ############################################################################## -package Pod::ParseLink; +package Pod::ParseLink v6.0.2; -use 5.010; -use strict; +use 5.012; use warnings; -use Exporter; +use Exporter qw(import); -our @ISA = qw(Exporter); our @EXPORT = qw(parselink); -our $VERSION = '5.01_02'; -$VERSION =~ tr/_//d; ############################################################################## # Implementation @@ -170,7 +166,8 @@ Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 2001, 2008, 2009, 2014, 2018-2019, 2022 Russ Allbery +Copyright 2001, 2008, 2009, 2014, 2018-2019, 2022, 2024 Russ Allbery + This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/podlators/lib/Pod/Text.pm b/cpan/podlators/lib/Pod/Text.pm index ef76bd9d0368..e89b01d26230 100644 --- a/cpan/podlators/lib/Pod/Text.pm +++ b/cpan/podlators/lib/Pod/Text.pm @@ -12,20 +12,15 @@ # Modules and declarations ############################################################################## -package Pod::Text; +package Pod::Text v6.0.2; -use 5.010; -use strict; +use 5.012; +use parent qw(Pod::Simple); use warnings; use Carp qw(carp croak); use Encode qw(encode); -use Exporter (); -use Pod::Simple (); - -our @ISA = qw(Pod::Simple Exporter); -our $VERSION = '5.01_02'; -$VERSION =~ tr/_//d; +use Exporter qw(import); # We have to export pod2text for backward compatibility. our @EXPORT = qw(pod2text); @@ -1208,12 +1203,18 @@ Pod::Text 4.09, included in Perl 5.25.7, fixed a serious bug on EBCDIC systems, present in all versions back to 3.00, that would cause opening brackets to disappear. -Pod::Text 5.00 now defaults, on non-EBCDIC systems, to UTF-8 encoding if it -sees a non-ASCII character in the input and the input encoding is not -specified. It also commits to an encoding with the first non-ASCII character -and does not change the output encoding if the input encoding changes. The -L module is now used for all output encoding rather than PerlIO -layers, which fixes earlier problems with output to scalars. +Pod::Text 5.00 and later, included in Perl 5.37.7, default, on non-EBCDIC +systems, to UTF-8 encoding if it sees a non-ASCII character in the input and +the input encoding is not specified. They also commit to an encoding with the +first non-ASCII character and does not change the output encoding if the input +encoding changes. The L module is now used for all output encoding +rather than PerlIO layers, which fixes earlier problems with output to +scalars. + +=head1 CAVEATS + +Line wrapping is done only at ASCII spaces and tabs, rather than using a +correct Unicode-aware line wrapping algorithm. =head1 AUTHOR diff --git a/cpan/podlators/lib/Pod/Text/Color.pm b/cpan/podlators/lib/Pod/Text/Color.pm index 2d33d6179d17..521276329305 100644 --- a/cpan/podlators/lib/Pod/Text/Color.pm +++ b/cpan/podlators/lib/Pod/Text/Color.pm @@ -10,19 +10,14 @@ # Modules and declarations ############################################################################## -package Pod::Text::Color; +package Pod::Text::Color v6.0.2; -use 5.010; -use strict; +use 5.012; +use parent qw(Pod::Text); use warnings; -use Pod::Text (); use Term::ANSIColor qw(color colored); -our @ISA = qw(Pod::Text); -our $VERSION = '5.01_02'; -$VERSION =~ tr/_//d; - ############################################################################## # Overrides ############################################################################## @@ -97,7 +92,7 @@ sub wrap { # $chars, used when we have to truncate and hard wrap. my $code = '(?:\e\[[\d;]+m)'; my $char = "(?>$code*[^\\n])"; - my $shortchar = '^(' . $char . "{0,$width}(?>$code*)" . ')(?:\s+|\z)'; + my $shortchar = '^(' . $char . "{0,$width}(?>$code*)" . ')(?:[ \t\n]+|\z)'; my $longchar = '^(' . $char . "{$width})"; while (length > $width) { if (s/$shortchar// || s/$longchar//) { @@ -178,21 +173,26 @@ Pod::Text::Color 2.01 was included in Perl 5.9.3, the first version of Perl to incorporate those changes. Several problems with wrapping and line length were fixed as recently as -Pod::Text::Color 4.11, included in Perl 5.29.1. +Pod::Text::Color 6.0.0. This module inherits its API and most behavior from Pod::Text, so the details in L also apply. Pod::Text and Pod::Text::Color have had the same module version since 4.00, included in Perl 5.23.7. (They unfortunately diverge in confusing ways prior to that.) +=head1 CAVEATS + +Line wrapping is done only at ASCII spaces and tabs, rather than using a +correct Unicode-aware line wrapping algorithm. + =head1 AUTHOR Russ Allbery . =head1 COPYRIGHT AND LICENSE -Copyright 1999, 2001, 2004, 2006, 2008, 2009, 2018-2019, 2022 Russ Allbery - +Copyright 1999, 2001, 2004, 2006, 2008, 2009, 2018-2019, 2022, 2024 Russ +Allbery This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/podlators/lib/Pod/Text/Overstrike.pm b/cpan/podlators/lib/Pod/Text/Overstrike.pm index 15e9920e911f..8982c42e312d 100644 --- a/cpan/podlators/lib/Pod/Text/Overstrike.pm +++ b/cpan/podlators/lib/Pod/Text/Overstrike.pm @@ -17,18 +17,12 @@ # Modules and declarations ############################################################################## -package Pod::Text::Overstrike; +package Pod::Text::Overstrike v6.0.2; -use 5.010; -use strict; +use 5.012; +use parent qw(Pod::Text); use warnings; -use Pod::Text (); - -our @ISA = qw(Pod::Text); -our $VERSION = '5.01_02'; -$VERSION =~ tr/_//d; - ############################################################################## # Overrides ############################################################################## @@ -115,7 +109,7 @@ sub wrap { # backspace, and a character). Use [^\n] rather than . to protect # against odd settings of $*. my $char = '(?:[^\n][\b])?[^\n]'; - if (s/^((?>$char){0,$width})(?:\Z|\s+)//) { + if (s/^((?>$char){0,$width})(?:\Z|[ \t\n]+)//) { $output .= $spaces . $1 . "\n"; } else { last; @@ -183,13 +177,18 @@ The current API based on L was added in Pod::Text::Overstrike 2.00, included in Perl 5.9.3. Several problems with wrapping and line length were fixed as recently as -Pod::Text::Overstrike 2.04, included in Perl 5.11.5. +Pod::Text::Overstrike 6.0.0. This module inherits its API and most behavior from Pod::Text, so the details in L also apply. Pod::Text and Pod::Text::Overstrike have had the same module version since 4.00, included in Perl 5.23.7. (They unfortunately diverge in confusing ways prior to that.) +=head1 CAVEATS + +Line wrapping is done only at ASCII spaces and tabs, rather than using a +correct Unicode-aware line wrapping algorithm. + =head1 AUTHOR Originally written by Joe Smith , using the framework @@ -197,9 +196,10 @@ created by Russ Allbery . Subsequently updated by Russ Allbery. =head1 COPYRIGHT AND LICENSE -Copyright 2000 by Joe Smith +Copyright 2000 Joe Smith -Copyright 2001, 2004, 2008, 2014, 2018-2019, 2022 by Russ Allbery +Copyright 2001, 2004, 2008, 2014, 2018-2019, 2022, 2024 Russ Allbery + This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/podlators/lib/Pod/Text/Termcap.pm b/cpan/podlators/lib/Pod/Text/Termcap.pm index ea61137788dc..b628d7a8b83a 100644 --- a/cpan/podlators/lib/Pod/Text/Termcap.pm +++ b/cpan/podlators/lib/Pod/Text/Termcap.pm @@ -10,20 +10,15 @@ # Modules and declarations ############################################################################## -package Pod::Text::Termcap; +package Pod::Text::Termcap v6.0.2; -use 5.010; -use strict; +use 5.012; +use parent qw(Pod::Text); use warnings; -use Pod::Text (); use POSIX (); use Term::Cap; -our @ISA = qw(Pod::Text); -our $VERSION = '5.01_02'; -$VERSION =~ tr/_//d; - ############################################################################## # Overrides ############################################################################## @@ -159,7 +154,7 @@ sub wrap { # $chars, used when we have to truncate and hard wrap. my $code = "(?:" . $self->format_regex() . ")"; my $char = "(?>$code*[^\\n])"; - my $shortchar = '^(' . $char . "{0,$width}(?>$code*)" . ')(?:\s+|\z)'; + my $shortchar = '^(' . $char . "{0,$width}(?>$code*)" . ')(?:[ \t\n]+|\z)'; my $longchar = '^(' . $char . "{$width})"; while (length > $width) { if (s/$shortchar// || s/$longchar//) { @@ -242,28 +237,33 @@ The current API based on L was added in Pod::Text::Termcap 2.00. Pod::Text::Termcap 2.01 was included in Perl 5.9.3, the first version of Perl to incorporate those changes. -Several problems with wrapping and line length were fixed as recently as -Pod::Text::Termcap 4.11, included in Perl 5.29.1. - Pod::Text::Termcap 4.13 stopped setting the TERMPATH environment variable during module load. It also stopped falling back on VT100 escape sequences if Term::Cap was not able to find usable escape sequences, instead producing unformatted output for better results on dumb terminals. The next version to be incorporated into Perl, 4.14, was included in Perl 5.31.8. +Several problems with wrapping and line length were fixed as recently as +Pod::Text::Termcap 6.0.0. + This module inherits its API and most behavior from Pod::Text, so the details in L also apply. Pod::Text and Pod::Text::Termcap have had the same module version since 4.00, included in Perl 5.23.7. (They unfortunately diverge in confusing ways prior to that.) +=head1 CAVEATS + +Line wrapping is done only at ASCII spaces and tabs, rather than using a +correct Unicode-aware line wrapping algorithm. + =head1 AUTHOR Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 1999, 2001-2002, 2004, 2006, 2008-2009, 2014-2015, 2018-2019, 2022 -Russ Allbery +Copyright 1999, 2001-2002, 2004, 2006, 2008-2009, 2014-2015, 2018-2019, 2022, +2024 Russ Allbery This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/podlators/scripts/pod2man.PL b/cpan/podlators/scripts/pod2man.PL index ba3de2398fea..ec7904476b17 100644 --- a/cpan/podlators/scripts/pod2man.PL +++ b/cpan/podlators/scripts/pod2man.PL @@ -1,11 +1,12 @@ #!/usr/bin/perl # -# Special wrapper script to generate the actual pod2man script. This is +# Special wrapper script to generate the actual pod2man script. This is # required for proper start-up code on non-UNIX platforms, and is used inside # Perl core. -use 5.008; -use strict; +# Do not use autodie here. When podlators is built as part of Perl core, it +# is built before autodie is available. +use 5.012; use warnings; use Config qw(%Config); @@ -14,7 +15,7 @@ use File::Basename qw(basename dirname); # List explicitly here the variables you want Configure to generate. # Metaconfig only looks for shell variables, so you have to mention them as if -# they were shell variables, not %Config entries. Thus you write +# they were shell variables, not %Config entries. Thus you write # $startperl # to ensure Configure will look for $Config{startperl}. @@ -27,18 +28,16 @@ if ($^O eq 'VMS') { } # Create the generated script. -## no critic (InputOutput::RequireBriefOpen) -## no critic (InputOutput::RequireCheckedSyscalls) open(my $out, '>', $file) or die "Cannot create $file: $!\n"; -print "Extracting $file (with variable substitutions)\n"; -## use critic +print "Extracting $file (with variable substitutions)\n" + or die "$0: cannot write to stdout: $!\n"; # In this section, Perl variables will be expanded during extraction. You can # use $Config{...} to use Configure variables. print {$out} <<"PREAMBLE" or die "Cannot write to $file: $!\n"; $Config{startperl} - eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}' - if 0; # ^ Run only under a shell +eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}' + if 0; # ^ Run only under a shell PREAMBLE # In the following, Perl variables are not expanded during extraction. @@ -50,78 +49,117 @@ print {$out} <<'SCRIPT_BODY' or die "Cannot write to $file: $!\n"; # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.006; -use strict; +use 5.012; use warnings; use Getopt::Long qw(GetOptions); use Pod::Man (); use Pod::Usage qw(pod2usage); -use strict; +# Format a single POD file. +# +# $parser - Pod::Man object to use +# $input - Input file, - or undef for standard input +# $output - Output file, - or undef for standard output +# $verbose - Whether to print each file to standard output when converted +# +# Returns: 0 on no errors, 1 if there was an error +sub format_file { + my ($parser, $input, $output, $verbose) = @_; + my $to_stdout = !defined($output) || $output eq q{-}; + if ($verbose && !$to_stdout) { + print " $output\n" or warn "$0: cannot write to stdout: $!\n"; + } + $parser->parse_from_file($input, $output); + if ($parser->{CONTENTLESS}) { + if (defined($input) && $input ne q{-}) { + warn "$0: unable to format $input\n"; + } else { + warn "$0: unable to format standard input\n"; + } + if (!$to_stdout && !-s $output) { + unlink($output); + } + return 1; + } + return 0; +} # Clean up $0 for error reporting. -$0 =~ s%.*/%%; +$0 =~ s{ .*/ }{}xms; # Insert -- into @ARGV before any single dash argument to hide it from # Getopt::Long; we want to interpret it as meaning stdin. my $stdin; -@ARGV = map { $_ eq '-' && !$stdin++ ? ('--', $_) : $_ } @ARGV; +local @ARGV = map { $_ eq q{-} && !$stdin++ ? (q{--}, $_) : $_ } @ARGV; # Parse our options, trying to retain backward compatibility with pod2man but # allowing short forms as well. --lax is currently ignored. my %options; -Getopt::Long::config ('bundling_override'); -GetOptions (\%options, 'center|c=s', 'date|d=s', 'encoding|e=s', 'errors=s', - 'fixed=s', 'fixedbold=s', 'fixeditalic=s', 'fixedbolditalic=s', - 'guesswork=s', 'help|h', 'lax|l', 'language=s', 'lquote=s', - 'name|n=s', 'nourls', 'official|o', 'quotes|q=s', 'release|r=s', - 'rquote=s', 'section|s=s', 'stderr', 'verbose|v', 'utf8|u') - or exit 1; -pod2usage (0) if $options{help}; +Getopt::Long::config('bundling_override'); +GetOptions( + \%options, + 'center|c=s', + 'date|d=s', + 'encoding|e=s', + 'errors=s', + 'fixed=s', + 'fixedbold=s', + 'fixeditalic=s', + 'fixedbolditalic=s', + 'guesswork=s', + 'help|h', + 'lax|l', + 'language=s', + 'lquote=s', + 'name|n=s', + 'nourls', + 'official|o', + 'quotes|q=s', + 'release|r=s', + 'rquote=s', + 'section|s=s', + 'stderr', + 'verbose|v', + 'utf8|u', +) or exit 1; +if ($options{help}) { + pod2usage(0); +} # Official sets --center, but don't override things explicitly set. -if ($options{official} && !defined $options{center}) { +if ($options{official} && !defined($options{center})) { $options{center} = 'Perl Programmers Reference Guide'; } -# Verbose is only our flag, not a Pod::Man flag. +# Delete flags that are only used in pod2man, not in Pod::Man. lax is accepted +# only for backward compatibility and does nothing. my $verbose = $options{verbose}; -delete $options{verbose}; - -# This isn't a valid Pod::Man option and is only accepted for backward -# compatibility. -delete $options{lax}; +delete @options{qw(verbose lax official)}; -# If neither stderr nor errors is set, default to errors = die. -if (!defined $options{stderr} && !defined $options{errors}) { +# If neither stderr nor errors is set, default to errors = die rather than the +# Pod::Man default of pod. +if (!defined($options{stderr}) && !defined($options{errors})) { $options{errors} = 'die'; } +# If given no arguments, read from stdin and write to stdout. +if (!@ARGV) { + push(@ARGV, q{-}); +} + # Initialize and run the formatter, pulling a pair of input and output off at -# a time. For each file, we check whether the document was completely empty +# a time. For each file, we check whether the document was completely empty # and, if so, will remove the created file and exit with a non-zero exit # status. -my $parser = Pod::Man->new (%options); +my $parser = Pod::Man->new(%options); my $status = 0; -my @files; -do { - @files = splice (@ARGV, 0, 2); - print " $files[1]\n" if $verbose; - $parser->parse_from_file (@files); - if ($parser->{CONTENTLESS}) { - $status = 1; - if (defined $files[0]) { - warn "$0: unable to format $files[0]\n"; - } else { - warn "$0: unable to format standard input\n"; - } - if (defined ($files[1]) and $files[1] ne '-') { - unlink $files[1] unless (-s $files[1]); - } - } -} while (@ARGV); -exit $status; +while (@ARGV) { + my ($input, $output) = splice(@ARGV, 0, 2); + my $result = format_file($parser, $input, $output, $verbose); + $status ||= $result; +} +exit($status); __END__ @@ -173,6 +211,9 @@ B<--section>, B<--release>, B<--center>, B<--date>, and B<--official> can be used to set the headers and footers to use. If not given, Pod::Man will assume various defaults. See below for details. +For specific details and caveats about the translation from POD to *roff, see +L. + =head1 OPTIONS Each option is annotated with the version of podlators in which that option @@ -381,6 +422,8 @@ recommended to set a meaningful manual page name. [2.5.0] Normally, LZ<><> formatting codes with a URL but anchor text are formatted to show both the anchor text and the URL. In other words: +=for ProhibitVerbatimMarkup allow next + L is formatted as: @@ -496,7 +539,7 @@ and Tom Christiansen. =head1 COPYRIGHT AND LICENSE -Copyright 1999-2001, 2004, 2006, 2008, 2010, 2012-2019, 2022 Russ Allbery +Copyright 1999-2001, 2004, 2006, 2008, 2010, 2012-2019, 2022-2024 Russ Allbery This program is free software; you may redistribute it and/or modify it @@ -505,10 +548,10 @@ under the same terms as Perl itself. =head1 SEE ALSO L, L, L, L, L, -L, L, L, L +L, L, L -The man page documenting the an macro set may be L instead of -L on your system. +The man page documenting the C macro set is usually either L or +L depending on the system. The current version of this script is always available from its web site at L. It is also part of the diff --git a/cpan/podlators/scripts/pod2text.PL b/cpan/podlators/scripts/pod2text.PL index 50088bfad340..0dff2ca806f0 100644 --- a/cpan/podlators/scripts/pod2text.PL +++ b/cpan/podlators/scripts/pod2text.PL @@ -4,8 +4,9 @@ # required for proper start-up code on non-UNIX platforms, and is used inside # Perl core. -use 5.008; -use strict; +# Do not use autodie here. When podlators is built as part of Perl core, it +# is built before autodie is available. +use 5.012; use warnings; use Config qw(%Config); @@ -27,11 +28,8 @@ if ($^O eq 'VMS') { } # Create the generated script. -## no critic (InputOutput::RequireBriefOpen) -## no critic (InputOutput::RequireCheckedSyscalls) open(my $out, '>', $file) or die "Cannot create $file: $!\n"; print "Extracting $file (with variable substitutions)\n"; -## use critic # In this section, Perl variables will be expanded during extraction. You can # use $Config{...} to use Configure variables. @@ -51,8 +49,7 @@ print {$out} <<'SCRIPT_BODY' or die "Cannot write to $file: $!\n"; # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.006; -use strict; +use 5.012; use warnings; use Getopt::Long qw(GetOptions); @@ -86,7 +83,7 @@ GetOptions (\%options, 'alt|a', 'code', 'color|c', 'encoding|e=s', 'errors=s', 'margin|left-margin|m=i', 'nourls', 'overstrike|o', 'quotes|q=s', 'sentence|s', 'stderr', 'termcap|t', 'utf8|u', 'width|w=i') or exit 1; -pod2usage (1) if $options{help}; +pod2usage (0) if $options{help}; # Figure out what formatter we're going to use. -c overrides -t. my $formatter = 'Pod::Text'; @@ -392,8 +389,8 @@ Russ Allbery . =head1 COPYRIGHT AND LICENSE -Copyright 1999-2001, 2004, 2006, 2008, 2010, 2012-2019, 2022 Russ Allbery - +Copyright 1999-2001, 2004, 2006, 2008, 2010, 2012-2019, 2022, 2024 Russ +Allbery This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/podlators/t/data/basic.man b/cpan/podlators/t/data/basic.man index bbfffc00c62d..2f5f68ccdda5 100644 --- a/cpan/podlators/t/data/basic.man +++ b/cpan/podlators/t/data/basic.man @@ -7,7 +7,7 @@ other interesting bits. .ie n .SH "This ""is"" a ""level 1"" heading" .el .SH "This \f(CWis\fP a ""level 1"" heading" .IX Header "This is a ""level 1"" heading" -.SS "``Level'' ""2 \fIheading\fP" +.SS "\`\`Level\*(Aq\*(Aq ""2 \fIheading\fP" .IX Subsection "``Level'' ""2 heading" \fILevel 3 \fR\f(BIheading with \fR\f(CB\*(C`weird stuff "" (double quote)\*(C'\fR .IX Subsection "Level 3 heading with weird stuff """" (double quote)" @@ -20,7 +20,7 @@ Now try again with \fBintermixed\fR \fItext\fR. .el .SH "This \f(CWis\fP a ""level 1"" heading" .IX Header "This is a ""level 1"" heading" Text. -.SS "``Level'' 2 \fIheading\fP" +.SS "\`\`Level\*(Aq\*(Aq 2 \fIheading\fP" .IX Subsection "``Level'' 2 heading" Text. .PP @@ -144,21 +144,21 @@ for one paragraph are properly compacted. .el .IP \f(CWbaz\fR 4 .IX Item "baz" .PD -There shouldn't be any spaces between any of these item tags; this idiom +There shouldn\*(Aqt be any spaces between any of these item tags; this idiom is used in perlfunc. .IP "Some longer item text" 4 .IX Item "Some longer item text" -Just to make sure that we test paragraphs where the item text doesn't fit +Just to make sure that we test paragraphs where the item text doesn\*(Aqt fit in the margin of the paragraph (and make sure that this paragraph fills a few lines). .Sp -Let's also make it multiple paragraphs to be sure that works. +Let\*(Aqs also make it multiple paragraphs to be sure that works. .PP Test use of =over without =item as a block "quote" or block paragraph. .Sp .RS 4 This should be indented four spaces but otherwise formatted the same as -any other regular text paragraph. Make sure it's long enough to see the +any other regular text paragraph. Make sure it\*(Aqs long enough to see the results of the formatting..... .RE .PP @@ -174,9 +174,9 @@ This paragraph should be doubly indented. .Sp This paragraph should only be singly indented. .IP \(bu 4 -This is an item in the middle of a block-quote, which should be allowed. +This is an item in the middle of a block\-quote, which should be allowed. .IP \(bu 4 -We're also testing tagless item commands. +We\*(Aqre also testing tagless item commands. .RE .RS 4 .Sp @@ -187,7 +187,7 @@ Should be back to regular indentation. .PP Now also check the transformation of * into real bullets for man pages. .IP \(bu 4 -An item. We're also testing using =over without a number, and making sure +An item. We\*(Aqre also testing using =over without a number, and making sure that item text wraps properly. .IP \(bu 4 Another item. @@ -204,7 +204,7 @@ Another test taken from Pod::Parser. This is a test to see if I can do not only \f(CW$self\fR and \f(CWmethod()\fR, but also \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and \&\f(CW\*(C`$Foo <=> $Bar\*(C'\fR without resorting to escape sequences. If -I want to refer to the right-shift operator I can do something +I want to refer to the right\-shift operator I can do something like \f(CW\*(C`$x >> 3\*(C'\fR or even \f(CW\*(C`$y >> 5\*(C'\fR. .PP Now for the grand finale of \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR. @@ -215,12 +215,12 @@ Of course I should still be able to do all this \fIwith\fR escape sequences too: \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and \&\f(CW\*(C`{FOO=>BAR}\*(C'\fR. .PP -Don't forget \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR. +Don\*(Aqt forget \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR. .PP And make sure that \f(CW0\fR works too! .PP Now, if I use << or >> as my delimiters, then I have to use whitespace. -So things like \f(CW\*(C`<$self\-\*(C'\fR\fBmethod()\fR>> and \f(CW\*(C`<$self\-\*(C'\fR{FIELDNAME}>> won't end +So things like \f(CW\*(C`<$self\-\*(C'\fR\fBmethod()\fR>> and \f(CW\*(C`<$self\-\*(C'\fR{FIELDNAME}>> won\*(Aqt end up doing what you might expect since the first > will still terminate the first < seen. .PP @@ -233,25 +233,26 @@ quotation from Winston Churchill. The following tests are added to those: .PP Make sure that a few other odd \fIthings\fR still work. This should be -a vertical bar: |. Here's a test of a few more special escapes +a vertical bar: |. Here\*(Aqs a test of a few more special escapes that have to be supported: .IP & 3 An ampersand. -.IP ' 3 +.IP \*(Aq 3 +.IX Item "'" An apostrophe. .IP < 3 -A less-than sign. +A less\-than sign. .IP > 3 -A greater-than sign. +A greater\-than sign. .IP """" 3 A double quotation mark. .IP / 3 A forward slash. .PP -Try to get this bit of text over towards the edge so |that\ all\ of\ this\ text\ inside\ S<>\ won't| be wrapped. Also test the -|same\ thing\ with\ non-breaking\ spaces.| +Try to get this bit of text over towards the edge so |that\ all\ of\ this\ text\ inside\ S<>\ won\*(Aqt| be wrapped. Also test the +|same\ thing\ with\ non\-breaking\ spaces.| .PP -There is a soft hy\%phen in hyphen at hy-phen. +There is a soft hy\%phen in hyphen at hy\-phen. .PP This is a test of an index entry. .IX Xref "index entry" @@ -273,7 +274,7 @@ Throw in a few verbatim paragraphs. \& print uncolor \*(Aq01;31\*(Aq, "\en"; .Ve .PP -But this isn't verbatim (make sure it wraps properly), and the next +But this isn\*(Aqt verbatim (make sure it wraps properly), and the next paragraph is again: .PP .Vb 2 @@ -283,7 +284,7 @@ paragraph is again: \& use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\en"; print "This text is normal.\en"; .Ve .PP -(Ugh, that's obnoxiously long.) Try different spacing: +(Ugh, that\*(Aqs obnoxiously long.) Try different spacing: .PP .Vb 7 \& Starting with a tab. @@ -295,7 +296,7 @@ paragraph is again: \& As should this. .Ve .PP -This isn't. +This isn\*(Aqt. .PP .Vb 2 \& This is. And this: is an internal tab. It should be: @@ -315,14 +316,14 @@ up.) .Ve .SH CONCLUSION .IX Header "CONCLUSION" -That's all, folks! +That\*(Aqs all, folks! .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2001, 2004, 2016, 2018 Russ Allbery .PP Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and -this notice are preserved. This file is offered as-is, without any +this notice are preserved. This file is offered as\-is, without any warranty. .PP -SPDX-License-Identifier: FSFAP +SPDX\-License\-Identifier: FSFAP diff --git a/cpan/podlators/t/data/man/encoding.groff b/cpan/podlators/t/data/man/encoding.groff index 649ffdd03e54..e5811146e3f2 100644 --- a/cpan/podlators/t/data/man/encoding.groff +++ b/cpan/podlators/t/data/man/encoding.groff @@ -50,6 +50,9 @@ . \} .\} .rr rF +.\" +.\" Required to disable full justification in groff 1.23.0. +.if n .ds AD l .\" ======================================================================== .\" .IX Title "ENCODING 1" @@ -72,7 +75,7 @@ Combining accent: nai\[u0308]ve .PP SMP plane character: \[u1F600] .PP -Non-breaking space: foo\ bar, foo\ bar +Non\-breaking space: foo\ bar, foo\ bar .PP Soft hyphen: fac\%tory .SH LICENSE @@ -81,7 +84,7 @@ Copyright 2022 Russ Allbery .PP Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and -this notice are preserved. This file is offered as-is, without any +this notice are preserved. This file is offered as\-is, without any warranty. .PP -SPDX-License-Identifier: FSFAP +SPDX\-License\-Identifier: FSFAP diff --git a/cpan/podlators/t/data/man/encoding.roff b/cpan/podlators/t/data/man/encoding.roff index 68152431efca..98585f1835e6 100644 --- a/cpan/podlators/t/data/man/encoding.roff +++ b/cpan/podlators/t/data/man/encoding.roff @@ -51,6 +51,9 @@ .\} .rr rF .\" +.\" Required to disable full justification in groff 1.23.0. +.if n .ds AD l +.\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff @@ -134,7 +137,7 @@ Combining accent: naiXve .PP SMP plane character: X .PP -Non-breaking space: foo\ bar, foo\ bar +Non\-breaking space: foo\ bar, foo\ bar .PP Soft hyphen: fac\%tory .SH LICENSE @@ -143,7 +146,7 @@ Copyright 2022 Russ Allbery .PP Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and -this notice are preserved. This file is offered as-is, without any +this notice are preserved. This file is offered as\-is, without any warranty. .PP -SPDX-License-Identifier: FSFAP +SPDX\-License\-Identifier: FSFAP diff --git a/cpan/podlators/t/data/man/encoding.utf8 b/cpan/podlators/t/data/man/encoding.utf8 index 077028a33f36..de7158abe30b 100644 --- a/cpan/podlators/t/data/man/encoding.utf8 +++ b/cpan/podlators/t/data/man/encoding.utf8 @@ -51,6 +51,9 @@ . \} .\} .rr rF +.\" +.\" Required to disable full justification in groff 1.23.0. +.if n .ds AD l .\" ======================================================================== .\" .IX Title "ENCODING 1" @@ -73,7 +76,7 @@ Combining accent: naïve .PP SMP plane character: 😀 .PP -Non-breaking space: foo\ bar, foo\ bar +Non\-breaking space: foo\ bar, foo\ bar .PP Soft hyphen: fac\%tory .SH LICENSE @@ -82,7 +85,7 @@ Copyright 2022 Russ Allbery .PP Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and -this notice are preserved. This file is offered as-is, without any +this notice are preserved. This file is offered as\-is, without any warranty. .PP -SPDX-License-Identifier: FSFAP +SPDX\-License\-Identifier: FSFAP diff --git a/cpan/podlators/t/data/perl.conf b/cpan/podlators/t/data/perl.conf index 4f70cad4f877..26bbd4775bbc 100644 --- a/cpan/podlators/t/data/perl.conf +++ b/cpan/podlators/t/data/perl.conf @@ -9,12 +9,11 @@ blib/lib/Pod/Text/Color.pm blib/lib/Pod/Text/Overstrike.pm blib/lib/Pod/Text/Termcap.pm - blib/script/pod2man blib/script/pod2text ); # Default minimum version requirement. -$MINIMUM_VERSION = '5.010'; +$MINIMUM_VERSION = '5.012'; # File must end with this line. 1; diff --git a/cpan/podlators/t/data/perltidyrc b/cpan/podlators/t/data/perltidyrc index dc3a2f74feea..69fa76fc7d27 100644 --- a/cpan/podlators/t/data/perltidyrc +++ b/cpan/podlators/t/data/perltidyrc @@ -6,7 +6,7 @@ # which can be found at . # # Written by Russ Allbery -# Copyright 2021-2022 Russ Allbery +# Copyright 2021-2024 Russ Allbery # Copyright 2012-2013 # The Board of Trustees of the Leland Stanford Junior University # @@ -17,14 +17,23 @@ # # SPDX-License-Identifier: FSFAP +-bal=1 # put line breaks after a label -bbao # put line breaks before any operator +-bfvt=2 # no newline before "or" after closing brace -nbbc # don't force blank lines before comments (bad for else blocks) -boc # do not re-break lists, since perltidy is awful at this +-cpb # put opening brace on same line as closing paren -ce # cuddle braces around else -l=79 # usually use 78, but don't want 79-long lines reformatted -nlop # disable vertical alignment of logical and ternary expressions +-vil='=>' # enable vertical alignment for hash definitions -pt=2 # don't add extra whitespace around parentheses -sbt=2 # ...or square brackets -nsfs # no space before semicolon in for (not that I use this form) --nvc # disable vertical alignment of = and similar symbols -xci # improve indentation of nested structures +-drc # delete repeated commas in a list +-wtc=m # add trailing commas to all multi-line lists +-atc # add trailing commas where needed +-dtc # delete trailing commas where needed +-dwic # remove commas interfering with welds +-viu # align trailing unless with if (not that I use unless) diff --git a/cpan/podlators/t/data/regenerate-data b/cpan/podlators/t/data/regenerate-data index d118afbc6378..315f0c3c2f44 100644 --- a/cpan/podlators/t/data/regenerate-data +++ b/cpan/podlators/t/data/regenerate-data @@ -7,15 +7,14 @@ # helper program regenerates those files using the local installation of # podlators. The output can then be reviewed with normal Git tools. # -# Copyright 2022 Russ Allbery +# Copyright 2022, 2024 Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 'blib/lib'; @@ -28,16 +27,13 @@ use Pod::Text::Overstrike; use Pod::Text::Termcap; # Hard-code configuration for Term::Cap to get predictable results. -#<<< -local $ENV{COLUMNS} = 80; -local $ENV{TERM} = 'xterm'; +local $ENV{COLUMNS} = 80; +local $ENV{TERM} = 'xterm'; local $ENV{TERMPATH} = File::Spec->catfile('t', 'data', 'termcap'); -local $ENV{TERMCAP} = 'xterm:co=#80:do=^J:md=\\E[1m:us=\\E[4m:me=\\E[m'; -#>>> +local $ENV{TERMCAP} = 'xterm:co=#80:do=^J:md=\\E[1m:us=\\E[4m:me=\\E[m'; # Map of translators to the file containing the formatted output for the # general/basic.t test. -#<<< my %output = ( 'Pod::Man' => File::Spec->catfile('t', 'data', 'basic.man'), 'Pod::Text' => File::Spec->catfile('t', 'data', 'basic.txt'), @@ -45,7 +41,6 @@ my %output = ( 'Pod::Text::Overstrike' => File::Spec->catfile('t', 'data', 'basic.ovr'), 'Pod::Text::Termcap' => File::Spec->catfile('t', 'data', 'basic.cap'), ); -#>>> # Regenerate those output files. my $input = File::Spec->catfile('t', 'data', 'basic.pod'); @@ -75,21 +70,19 @@ for my $module (keys(%output)) { # Now switch to the files for the man/encoding.t test. $input = File::Spec->catfile('t', 'data', 'man', 'encoding.pod'); -#<<< %output = ( groff => File::Spec->catfile('t', 'data', 'man', 'encoding.groff'), roff => File::Spec->catfile('t', 'data', 'man', 'encoding.roff'), utf8 => File::Spec->catfile('t', 'data', 'man', 'encoding.utf8'), ); -#>>> # For each encoding, load the input, generate the output, and check that the # output matches. for my $encoding (keys(%output)) { my $parser = Pod::Man->new( encoding => $encoding, - center => 'podlators', - release => 'testing', + center => 'podlators', + release => 'testing', ); my $output; $parser->output_string(\$output); diff --git a/cpan/podlators/t/data/snippets/color/nonbreaking-wrap b/cpan/podlators/t/data/snippets/color/nonbreaking-wrap new file mode 100644 index 000000000000..1784e237388a --- /dev/null +++ b/cpan/podlators/t/data/snippets/color/nonbreaking-wrap @@ -0,0 +1,17 @@ +[name] +Wrapping with non-breaking space + +[input] +=encoding utf8 + +=head1 blahblah + +Blah blah blah. The following formula should not be folded: +S + +=cut + +[output] +blahblah + Blah blah blah. The following formula should not be folded: + a + b + c + d + e + f + g + h + i diff --git a/cpan/podlators/t/data/snippets/man/error-normal b/cpan/podlators/t/data/snippets/man/error-normal index 364fc55cebf9..644e09b52dff 100644 --- a/cpan/podlators/t/data/snippets/man/error-normal +++ b/cpan/podlators/t/data/snippets/man/error-normal @@ -21,4 +21,4 @@ Bar. Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 7:" 4 .IX Item "Around line 7:" -You forgot a '=back' before '=head1' +You forgot a \*(Aq=back\*(Aq before \*(Aq=head1\*(Aq diff --git a/cpan/podlators/t/data/snippets/man/error-pod b/cpan/podlators/t/data/snippets/man/error-pod index d8c8f028b77f..a7a06608b0d4 100644 --- a/cpan/podlators/t/data/snippets/man/error-pod +++ b/cpan/podlators/t/data/snippets/man/error-pod @@ -24,4 +24,4 @@ Bar. Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 7:" 4 .IX Item "Around line 7:" -You forgot a '=back' before '=head1' +You forgot a \*(Aq=back\*(Aq before \*(Aq=head1\*(Aq diff --git a/cpan/podlators/t/data/snippets/man/fixed-font-in-item b/cpan/podlators/t/data/snippets/man/fixed-font-in-item index 523ac7326ab6..137b897569fe 100644 --- a/cpan/podlators/t/data/snippets/man/fixed-font-in-item +++ b/cpan/podlators/t/data/snippets/man/fixed-font-in-item @@ -16,10 +16,10 @@ didn't properly stop italic. =back [output] -.SH "Fixed-width Fonts in =item" +.SH "Fixed\-width Fonts in =item" .IX Header "Fixed-width Fonts in =item" In podlators 4.06 and earlier, italic was terminated with \ef(CW, which -didn't properly stop italic. +didn\*(Aqt properly stop italic. .ie n .IP """tar \fIoption\fR... [\fIname\fR]...""" 2 .el .IP "\f(CWtar \fR\f(CIoption\fR\f(CW... [\fR\f(CIname\fR\f(CW]...\fR" 2 .IX Item "tar option... [name]..." @@ -27,3 +27,4 @@ didn't properly stop italic. .ie n .IP """tar \fIletter\fR... [\fIargument\fR]... [\fIoption\fR]... [\fIname\fR]...""" 2 .el .IP "\f(CWtar \fR\f(CIletter\fR\f(CW... [\fR\f(CIargument\fR\f(CW]... [\fR\f(CIoption\fR\f(CW]... [\fR\f(CIname\fR\f(CW]...\fR" 2 .IX Item "tar letter... [argument]... [option]... [name]..." +.PD diff --git a/cpan/podlators/t/data/snippets/man/guesswork b/cpan/podlators/t/data/snippets/man/guesswork index ff9a46248cb5..65a5358dc6a8 100644 --- a/cpan/podlators/t/data/snippets/man/guesswork +++ b/cpan/podlators/t/data/snippets/man/guesswork @@ -4,7 +4,7 @@ Non-quoting guesswork applied by default [input] =head1 GUESSWORK -The hyphens-in-compound-words shouldn't be escaped, but e-mail should be. +Both hyphens-in-compound-words and e-mail should be escaped. Function: foo(), bar::baz(), _private::_stuff() @@ -15,7 +15,7 @@ Variables: $foo, @bar::baz, %Pod::Blah [output] .SH GUESSWORK .IX Header "GUESSWORK" -The hyphens-in-compound-words shouldn't be escaped, but e\-mail should be. +Both hyphens\-in\-compound\-words and e\-mail should be escaped. .PP Function: \fBfoo()\fR, \fBbar::baz()\fR, \fB_private::_stuff()\fR .PP diff --git a/cpan/podlators/t/data/snippets/man/guesswork-all b/cpan/podlators/t/data/snippets/man/guesswork-all index 536d5ae3e7c1..89bfd38a709b 100644 --- a/cpan/podlators/t/data/snippets/man/guesswork-all +++ b/cpan/podlators/t/data/snippets/man/guesswork-all @@ -7,7 +7,7 @@ guesswork all [input] =head1 GUESSWORK -The hyphens-in-compound-words shouldn't be escaped, but e-mail should be. +Both hyphens-in-compound-words and e-mail should be escaped. Function: foo(), bar::baz(), _private::_stuff() @@ -18,7 +18,7 @@ Variables: $foo, @bar::baz, %Pod::Blah [output] .SH GUESSWORK .IX Header "GUESSWORK" -The hyphens-in-compound-words shouldn't be escaped, but e\-mail should be. +Both hyphens\-in\-compound\-words and e\-mail should be escaped. .PP Function: \fBfoo()\fR, \fBbar::baz()\fR, \fB_private::_stuff()\fR .PP diff --git a/cpan/podlators/t/data/snippets/man/guesswork-none b/cpan/podlators/t/data/snippets/man/guesswork-none index 518760608788..f19c68b0e605 100644 --- a/cpan/podlators/t/data/snippets/man/guesswork-none +++ b/cpan/podlators/t/data/snippets/man/guesswork-none @@ -7,7 +7,7 @@ guesswork none [input] =head1 GUESSWORK -The hyphens-in-compound-words shouldn't be escaped, but e-mail should be. +Both hyphens-in-compound-words and e-mail should be escaped. Function: foo(), bar::baz(), _private::_stuff() @@ -18,7 +18,7 @@ Variables: $foo, @bar::baz, %Pod::Blah [output] .SH GUESSWORK .IX Header "GUESSWORK" -The hyphens-in-compound-words shouldn't be escaped, but e\-mail should be. +Both hyphens\-in\-compound\-words and e\-mail should be escaped. .PP Function: foo(), bar::baz(), _private::_stuff() .PP diff --git a/cpan/podlators/t/data/snippets/man/guesswork-partial b/cpan/podlators/t/data/snippets/man/guesswork-partial index b90e1b9da212..c68cfa5e9c31 100644 --- a/cpan/podlators/t/data/snippets/man/guesswork-partial +++ b/cpan/podlators/t/data/snippets/man/guesswork-partial @@ -7,7 +7,7 @@ guesswork functions,variables [input] =head1 GUESSWORK -The hyphens-in-compound-words shouldn't be escaped, but e-mail should be. +Both hyphens-in-compound-words and e-mail should be escaped. Function: foo(), bar::baz(), _private::_stuff() @@ -18,7 +18,7 @@ Variables: $foo, @bar::baz, %Pod::Blah [output] .SH GUESSWORK .IX Header "GUESSWORK" -The hyphens-in-compound-words shouldn't be escaped, but e\-mail should be. +Both hyphens\-in\-compound\-words and e\-mail should be escaped. .PP Function: \fBfoo()\fR, \fBbar::baz()\fR, \fB_private::_stuff()\fR .PP diff --git a/cpan/podlators/t/data/snippets/man/hyphen-in-s b/cpan/podlators/t/data/snippets/man/hyphen-in-s deleted file mode 100644 index 754ae167f1bf..000000000000 --- a/cpan/podlators/t/data/snippets/man/hyphen-in-s +++ /dev/null @@ -1,14 +0,0 @@ -[name] -Hyphen in S<> - -[input] -=head1 Hyphen in SEE - -Don't S. This "one's-fine!", as well. However, -$-0.13 should have a real hyphen. - -[output] -.SH "Hyphen in S<>" -.IX Header "Hyphen in S<>" -Don't transform\ even-this\ hyphen. This "one's-fine!", as well. However, -$\-0.13 should have a real hyphen. diff --git a/cpan/podlators/t/data/snippets/man/iso-8859-1 b/cpan/podlators/t/data/snippets/man/iso-8859-1 index 4454d09ca6c7..6c2f229a7561 100644 --- a/cpan/podlators/t/data/snippets/man/iso-8859-1 +++ b/cpan/podlators/t/data/snippets/man/iso-8859-1 @@ -28,4 +28,4 @@ Beyonc \& Beyoncé! Beyoncé! .Ve .PP -Older versions didn't convert Beyoncé in verbatim. +Older versions didn\*(Aqt convert Beyoncé in verbatim. diff --git a/cpan/podlators/t/data/snippets/man/iso-8859-1-roff b/cpan/podlators/t/data/snippets/man/iso-8859-1-roff index c0294811382a..eb84735c82da 100644 --- a/cpan/podlators/t/data/snippets/man/iso-8859-1-roff +++ b/cpan/podlators/t/data/snippets/man/iso-8859-1-roff @@ -28,4 +28,4 @@ Beyonce\*'! Beyonce\*'! Beyonce\*'!! \& Beyonce\*'! Beyonce\*'! .Ve .PP -Older versions didn't convert Beyonce\*' in verbatim. +Older versions didn\*(Aqt convert Beyonce\*' in verbatim. diff --git a/cpan/podlators/t/data/snippets/man/item-spacing b/cpan/podlators/t/data/snippets/man/item-spacing new file mode 100644 index 000000000000..8afa3e814aac --- /dev/null +++ b/cpan/podlators/t/data/snippets/man/item-spacing @@ -0,0 +1,39 @@ +[name] +Spacing of =item without body + +[input] +=over 4 + +=item A + +Line + +=over 4 + +=item 1 + +=item 2 + +=back + +=item B + +Line + +=back + +[output] +.IP A 4 +.IX Item "A" +Line +.RS 4 +.IP 1. 4 +.PD 0 +.IP 2. 4 +.PD +.RE +.RS 4 +.RE +.IP B 4 +.IX Item "B" +Line diff --git a/cpan/podlators/t/data/snippets/man/man-l b/cpan/podlators/t/data/snippets/man/man-l new file mode 100644 index 000000000000..262d2ea7b1cd --- /dev/null +++ b/cpan/podlators/t/data/snippets/man/man-l @@ -0,0 +1,24 @@ +[name] +Formatting of man page references in L<> + +[input] +=head1 MAN REFERENCE + +L + +L program|ls(1)> + +L + +L<@@RXVT_NAME@@perl(3)> + +[output] +.SH "MAN REFERENCE" +.IX Header "MAN REFERENCE" +\&\fBPod::Man\fR\|(3pm) +.PP +\&\fBls\fR program +.PP +\&\fBapt\-get\fR\|(1) +.PP +\&\fB@@RXVT_NAME@@perl\fR\|(3) diff --git a/cpan/podlators/t/data/snippets/man/nonbreaking-space-l b/cpan/podlators/t/data/snippets/man/nonbreaking-space-l index 2f48619c0e70..faf179170296 100644 --- a/cpan/podlators/t/data/snippets/man/nonbreaking-space-l +++ b/cpan/podlators/t/data/snippets/man/nonbreaking-space-l @@ -18,7 +18,7 @@ S> .SH URLS .IX Header "URLS" S<> wrapping L<> should make the space between the anchor and URL -non-breaking and thus keep them together. +non\-breaking and thus keep them together. .PP perl Net::DNS Net::DNS::RR Net::DNS::SEC RFC2535\ diff --git a/cpan/podlators/t/data/snippets/man/not-numbers b/cpan/podlators/t/data/snippets/man/not-numbers index ecb48f1094f4..af3505b350e7 100644 --- a/cpan/podlators/t/data/snippets/man/not-numbers +++ b/cpan/podlators/t/data/snippets/man/not-numbers @@ -24,7 +24,10 @@ Lists not parsed as numbers .PD 0 .IP "2. Spaced right" 4 .IX Item "2. Spaced right" +.PD .IP "1 Not a number" 2 .IX Item "1 Not a number" +.PD 0 .IP "2 Spaced right" 2 .IX Item "2 Spaced right" +.PD diff --git a/cpan/podlators/t/data/snippets/man/quote-escaping b/cpan/podlators/t/data/snippets/man/quote-escaping index 9f0a5946f6bd..4dad85d35a6e 100644 --- a/cpan/podlators/t/data/snippets/man/quote-escaping +++ b/cpan/podlators/t/data/snippets/man/quote-escaping @@ -4,9 +4,9 @@ Quote escaping [input] =head1 Quote escaping -Don't escape `this' but do escape C<`this'> (and don't surround it in quotes). +Escape both `this' and C<`this'> (and don't surround it in quotes). [output] .SH "Quote escaping" .IX Header "Quote escaping" -Don't escape `this' but do escape \f(CW\`this\*(Aq\fR (and don't surround it in quotes). +Escape both \`this\*(Aq and \f(CW\`this\*(Aq\fR (and don\*(Aqt surround it in quotes). diff --git a/cpan/podlators/t/data/snippets/man/utf8-nonbreaking b/cpan/podlators/t/data/snippets/man/utf8-nonbreaking index 378397ddc0bb..a4e0a80716a4 100644 --- a/cpan/podlators/t/data/snippets/man/utf8-nonbreaking +++ b/cpan/podlators/t/data/snippets/man/utf8-nonbreaking @@ -14,4 +14,4 @@ This is S. [output] .SH "S<> output with UTF\-8" .IX Header "S<> output with UTF-8" -This is non-breaking\ output. +This is non\-breaking\ output. diff --git a/cpan/podlators/t/data/snippets/overstrike/nonbreaking-wrap b/cpan/podlators/t/data/snippets/overstrike/nonbreaking-wrap new file mode 100644 index 000000000000..4acec422962b --- /dev/null +++ b/cpan/podlators/t/data/snippets/overstrike/nonbreaking-wrap @@ -0,0 +1,17 @@ +[name] +Wrapping with non-breaking space + +[input] +=encoding utf8 + +=head1 blahblah + +Blah blah blah. The following formula should not be folded: +S + +=cut + +[output] +bbllaahhbbllaahh + Blah blah blah. The following formula should not be folded: + a + b + c + d + e + f + g + h + i diff --git a/cpan/podlators/t/data/snippets/termcap/nonbreaking-wrap b/cpan/podlators/t/data/snippets/termcap/nonbreaking-wrap new file mode 100644 index 000000000000..b538af7e8a68 --- /dev/null +++ b/cpan/podlators/t/data/snippets/termcap/nonbreaking-wrap @@ -0,0 +1,17 @@ +[name] +Wrapping with non-breaking space + +[input] +=encoding utf8 + +=head1 blahblah + +Blah blah blah. The following formula should not be folded: +S + +=cut + +[output] +blahblah + Blah blah blah. The following formula should not be folded: + a + b + c + d + e + f + g + h + i diff --git a/cpan/podlators/t/data/snippets/text/nonbreaking-wrap b/cpan/podlators/t/data/snippets/text/nonbreaking-wrap new file mode 100644 index 000000000000..06d3db70d474 --- /dev/null +++ b/cpan/podlators/t/data/snippets/text/nonbreaking-wrap @@ -0,0 +1,15 @@ +[name] +Wrapping with non-breaking space + +[input] +=head1 blahblah + +Blah blah blah. The following formula should not be folded: +S + +=cut + +[output] +blahblah + Blah blah blah. The following formula should not be folded: + a + b + c + d + e + f + g + h + i diff --git a/cpan/podlators/t/docs/changes.t b/cpan/podlators/t/docs/changes.t index 94b800066ced..b2ff0687e562 100644 --- a/cpan/podlators/t/docs/changes.t +++ b/cpan/podlators/t/docs/changes.t @@ -5,7 +5,7 @@ # The canonical version of this file is maintained in the rra-c-util package, # which can be found at . # -# Copyright 2021 Russ Allbery +# Copyright 2021, 2024 Russ Allbery # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -27,8 +27,7 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/docs/pod-spelling.t b/cpan/podlators/t/docs/pod-spelling.t index 497dce31b8d3..ffe2047f05c2 100644 --- a/cpan/podlators/t/docs/pod-spelling.t +++ b/cpan/podlators/t/docs/pod-spelling.t @@ -6,7 +6,7 @@ # which can be found at . # # Written by Russ Allbery -# Copyright 2019, 2021 Russ Allbery +# Copyright 2019, 2021, 2024 Russ Allbery # Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -30,8 +30,7 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/docs/pod.t b/cpan/podlators/t/docs/pod.t index 85974d82c3b1..95430a56208f 100644 --- a/cpan/podlators/t/docs/pod.t +++ b/cpan/podlators/t/docs/pod.t @@ -6,7 +6,7 @@ # which can be found at . # # Written by Russ Allbery -# Copyright 2019, 2021 Russ Allbery +# Copyright 2019, 2021, 2023-2024 Russ Allbery # Copyright 2012-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -30,8 +30,7 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; use warnings; use lib 't/lib'; @@ -49,7 +48,10 @@ use_prereq('Test::Pod'); # Check all POD in the Perl distribution. Add the examples and t/lib # directories if they exist. Also add any files in usr/bin or usr/sbin, # which are widely used in Stanford-internal packages. -my @files = all_pod_files(); +my @files; +if (-d 'blib' || -d 'lib') { + push(@files, all_pod_files()); +} if (-d 'examples') { push(@files, all_pod_files('examples')); } diff --git a/cpan/podlators/t/docs/spdx-license.t b/cpan/podlators/t/docs/spdx-license.t index 15ee7e055382..d5511377f4a3 100644 --- a/cpan/podlators/t/docs/spdx-license.t +++ b/cpan/podlators/t/docs/spdx-license.t @@ -9,7 +9,7 @@ # The canonical version of this file is maintained in the rra-c-util package, # which can be found at . # -# Copyright 2018-2021 Russ Allbery +# Copyright 2018-2021, 2023-2024 Russ Allbery # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -31,13 +31,14 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; +use autodie; use warnings; use lib 't/lib'; use Test::RRA qw(skip_unless_automated); +use Test::RRA::Config qw(@SPDX_IGNORE); use File::Find qw(find); use Test::More; @@ -45,35 +46,32 @@ use Test::More; # File name (the file without any directory component) and path patterns to # skip for this check. ## no critic (RegularExpressions::ProhibitFixedStringMatches) -#<<< my @IGNORE = ( - qr{ \A Build ( [.] (?!PL) .* )? \z }ixms, # Generated file from Build.PL + qr{ \A Build ([.] (?!PL) .*)? \z }ixms, # Generated file from Build.PL qr{ \A LICENSE \z }xms, # Generated file, no license itself - qr{ \A (Changes|NEWS|THANKS) \z }xms, # Package license should be fine - qr{ \A TODO \z }xms, # Package license should be fine + qr{ \A (Changes|THANKS|TODO) \z }xms, # Package license should be fine qr{ \A MANIFEST ( [.] .* )? \z }xms, # Package license should be fine qr{ \A Makefile \z }xms, # Generated file, no license itself qr{ \A (MY)? META [.] .* }xms, # Generated file, no license itself qr{ [.] output \z }xms, # Test data + qr{ cpanfile [.] snapshot }xms, # Carton snapshot qr{ pod2htm . [.] tmp \z }xms, # Windows pod2html output qr{ ~ \z }xms, # Backup files ); my @IGNORE_PATHS = ( - qr{ \A [.] / [.] git/ }xms, # Version control files - qr{ \A [.] / [.] pc/ }xms, # quilt metadata files - qr{ \A [.] /_build/ }xms, # Module::Build metadata - qr{ \A [.] /blib/ }xms, # Perl build system artifacts - qr{ \A [.] /cover_db/ }xms, # Artifacts from coverage testing - qr{ \A [.] /debian/ }xms, # Found in debian/* branches - qr{ \A [.] /docs/metadata/ }xms, # Package license should be fine - qr{ \A [.] /README ( [.] .* )? \z }xms, # Package license should be fine - qr{ \A [.] /share/ }xms, # Package license should be fine - qr{ \A [.] /t/data/generate/ }xms, # Test metadata - qr{ \A [.] /t/data/spin/ }xms, # Test metadata - qr{ \A [.] /t/data/update/ }xms, # Test output - qr{ \A [.] /t/data .* [.] json \z }xms, # Test metadata + @SPDX_IGNORE, + qr{ \A [.] / [.] git/ }xms, # Version control files + qr{ \A [.] / [.] pc/ }xms, # quilt metadata files + qr{ \A [.] /_build/ }xms, # Module::Build metadata + qr{ \A [.] /blib/ }xms, # Perl build system artifacts + qr{ \A [.] /cover_db/ }xms, # Artifacts from coverage testing + qr{ \A [.] /debian/ }xms, # Found in debian/* branches + qr{ \A [.] /local/ }xms, # Carton local lib + qr{ \A [.] /README ( [.] .* )? \z }xms, # Package license should be fine + qr{ \A [.] /share/ }xms, # Package license should be fine + qr{ \A [.] /t/data .* [.] json \z }xms, # Test metadata + qr{ \A [.] /t/tmp }xms, # Test metadata ); -#>>> ## use critic # Only run this test during automated testing, since failure doesn't indicate @@ -104,12 +102,12 @@ sub check_file { # Scan the file. my ($saw_legacy_notice, $saw_spdx, $skip_spdx); - open(my $file, '<', $filename) or BAIL_OUT("Cannot open $path"); + open(my $file, '<', $filename); while (defined(my $line = <$file>)) { if ($line =~ m{ \b See \s+ LICENSE \s+ for \s+ licensing }xms) { $saw_legacy_notice = 1; } - if ($line =~ m{ \b SPDX-License-Identifier: \s+ \S+ }xms) { + if ($line =~ m{ \b SPDX\\?-License\\?-Identifier: \s+ \S+ }xms) { $saw_spdx = 1; last; } @@ -118,10 +116,10 @@ sub check_file { last; } } - close($file) or BAIL_OUT("Cannot close $path"); + close($file); # If there is a legacy license notice, report a failure regardless of file - # size. Otherwise, skip files under 1KB. They can be rolled up into the + # size. Otherwise, skip files under 1KiB. They can be rolled up into the # overall project license and the license notice may be a substantial # portion of the file size. if ($saw_legacy_notice) { diff --git a/cpan/podlators/t/docs/synopsis.t b/cpan/podlators/t/docs/synopsis.t index b19b4dd3de60..926191fc90e4 100644 --- a/cpan/podlators/t/docs/synopsis.t +++ b/cpan/podlators/t/docs/synopsis.t @@ -6,7 +6,7 @@ # which can be found at . # # Written by Russ Allbery -# Copyright 2019, 2021 Russ Allbery +# Copyright 2019, 2021, 2024 Russ Allbery # Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -30,8 +30,7 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/general/basic.t b/cpan/podlators/t/general/basic.t index a0c84e9d3ae2..22406c75d199 100644 --- a/cpan/podlators/t/general/basic.t +++ b/cpan/podlators/t/general/basic.t @@ -12,7 +12,7 @@ # the machinery to run small POD snippets through the specific formatter being # tested should probably be used instead. # -# Copyright 2001-2002, 2004, 2006, 2009, 2012, 2014-2015, 2018-2019, 2022 +# Copyright 2001-2002, 2004, 2006, 2009, 2012, 2014-2015, 2018-2019, 2022-2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it @@ -20,8 +20,7 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; @@ -39,23 +38,23 @@ BEGIN { use_ok('Pod::Text::Termcap'); } +# Ensure color is enabled for testing purposes. +delete $ENV{NO_COLOR}; + # Flush output, since otherwise our diag messages come after other tests. local $| = 1; # Hard-code configuration for Term::Cap to get predictable results. -#<<< -local $ENV{COLUMNS} = 80; -local $ENV{TERM} = 'xterm'; +local $ENV{COLUMNS} = 80; +local $ENV{TERM} = 'xterm'; local $ENV{TERMPATH} = File::Spec->catfile('t', 'data', 'termcap'); -local $ENV{TERMCAP} = 'xterm:co=#80:do=^J:md=\\E[1m:us=\\E[4m:me=\\E[m'; -#>>> +local $ENV{TERMCAP} = 'xterm:co=#80:do=^J:md=\\E[1m:us=\\E[4m:me=\\E[m'; # Find the source of the test file. my $input = File::Spec->catfile('t', 'data', 'basic.pod'); # Map of translators to the file containing the formatted output to compare # against. -#<<< my %output = ( 'Pod::Man' => File::Spec->catfile('t', 'data', 'basic.man'), 'Pod::Text' => File::Spec->catfile('t', 'data', 'basic.txt'), @@ -63,7 +62,6 @@ my %output = ( 'Pod::Text::Overstrike' => File::Spec->catfile('t', 'data', 'basic.ovr'), 'Pod::Text::Termcap' => File::Spec->catfile('t', 'data', 'basic.cap'), ); -#>>> # Walk through teach of the modules and format the sample file, checking to # ensure the results match the pre-generated file. diff --git a/cpan/podlators/t/general/filehandle.t b/cpan/podlators/t/general/filehandle.t index 7cd766acbcb8..0093a53ad153 100644 --- a/cpan/podlators/t/general/filehandle.t +++ b/cpan/podlators/t/general/filehandle.t @@ -6,15 +6,15 @@ # Pod::Man and Pod::Text had to implement it directly. Test to be sure it's # working properly. # -# Copyright 2006, 2009, 2012, 2014-2016, 2018-2019 Russ Allbery +# Copyright 2006, 2009, 2012, 2014-2016, 2018-2019, 2024 +# Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/general/pod-parser.t b/cpan/podlators/t/general/pod-parser.t index e5f398fb59fb..83aa571122dc 100644 --- a/cpan/podlators/t/general/pod-parser.t +++ b/cpan/podlators/t/general/pod-parser.t @@ -2,15 +2,15 @@ # # Tests for backward compatibility with Pod::Parser. # -# Copyright 2006, 2008-2009, 2012, 2015, 2018-2019 Russ Allbery +# Copyright 2006, 2008-2009, 2012, 2015, 2018-2019, 2024 +# Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/lib/Test/Podlators.pm b/cpan/podlators/t/lib/Test/Podlators.pm index 5efacba83214..c9787eb4bb32 100644 --- a/cpan/podlators/t/lib/Test/Podlators.pm +++ b/cpan/podlators/t/lib/Test/Podlators.pm @@ -6,20 +6,16 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -package Test::Podlators; +package Test::Podlators v6.0.0; -use 5.010; -use base qw(Exporter); -use strict; +use 5.012; use warnings; use Encode qw(decode encode); -use Exporter; +use Exporter qw(import); use File::Spec; use Test::More; -our $VERSION = '2.01'; - # Export the test helper functions. our @EXPORT_OK = qw( read_snippet read_test_data slurp test_snippet test_snippet_with_io @@ -580,7 +576,7 @@ Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 2015-2016, 2018-2020, 2022 Russ Allbery +Copyright 2015-2016, 2018-2020, 2022, 2024 Russ Allbery This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/podlators/t/lib/Test/RRA.pm b/cpan/podlators/t/lib/Test/RRA.pm index a66ef4d43d06..9977feb877fa 100644 --- a/cpan/podlators/t/lib/Test/RRA.pm +++ b/cpan/podlators/t/lib/Test/RRA.pm @@ -8,14 +8,14 @@ # # SPDX-License-Identifier: MIT -package Test::RRA; +package Test::RRA v11.0.0; -use 5.010; -use base qw(Exporter); -use strict; +use 5.012; +use autodie; use warnings; use Carp qw(croak); +use Exporter qw(import); use File::Temp; # Abort if Test::More was loaded before Test::RRA to be sure that we get the @@ -38,22 +38,10 @@ if ($@) { exit 0; } -# Declare variables that should be set in BEGIN for robustness. -our (@EXPORT_OK, $VERSION); - -# Set $VERSION and everything export-related in a BEGIN block for robustness -# against circular module loading (not that we load any modules, but -# consistency is good). -BEGIN { - @EXPORT_OK = qw( - is_file_contents skip_unless_author skip_unless_automated use_prereq - ); - - # This version should match the corresponding rra-c-util release, but with - # two digits for the minor version, including a leading zero if necessary, - # so that it will sort properly. - $VERSION = '10.03'; -} +# Exports. +our @EXPORT_OK = qw( + is_file_contents skip_unless_author skip_unless_automated use_prereq +); # Compare a string to the contents of a file, similar to the standard is() # function, but to show the line-based unified diff between them if they @@ -69,9 +57,9 @@ sub is_file_contents { my ($got, $expected, $message) = @_; # If they're equal, this is simple. - open(my $fh, '<', $expected) or BAIL_OUT("Cannot open $expected: $!\n"); + open(my $fh, '<', $expected); my $data = do { local $/ = undef; <$fh> }; - close($fh) or BAIL_OUT("Cannot close $expected: $!\n"); + close($fh); if ($got eq $data) { is($got, $data, $message); return; @@ -283,7 +271,7 @@ Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 2016, 2018-2019, 2021 Russ Allbery +Copyright 2016, 2018-2019, 2021, 2024 Russ Allbery Copyright 2013-2014 The Board of Trustees of the Leland Stanford Junior University diff --git a/cpan/podlators/t/lib/Test/RRA/Config.pm b/cpan/podlators/t/lib/Test/RRA/Config.pm index 3c44442f11ad..7707b1db4752 100644 --- a/cpan/podlators/t/lib/Test/RRA/Config.pm +++ b/cpan/podlators/t/lib/Test/RRA/Config.pm @@ -7,33 +7,20 @@ # # SPDX-License-Identifier: MIT -package Test::RRA::Config; +package Test::RRA::Config v11.0.0; -use 5.010; -use base qw(Exporter); -use strict; +use 5.012; use warnings; +use Exporter qw(import); use Test::More; -# Declare variables that should be set in BEGIN for robustness. -our (@EXPORT_OK, $VERSION); - -# Set $VERSION and everything export-related in a BEGIN block for robustness -# against circular module loading (not that we load any modules, but -# consistency is good). -BEGIN { - @EXPORT_OK = qw( - $COVERAGE_LEVEL @COVERAGE_SKIP_TESTS @CRITIC_IGNORE $LIBRARY_PATH - $MINIMUM_VERSION %MINIMUM_VERSION @MODULE_VERSION_IGNORE - @POD_COVERAGE_EXCLUDE @STRICT_IGNORE @STRICT_PREREQ - ); - - # This version should match the corresponding rra-c-util release, but with - # two digits for the minor version, including a leading zero if necessary, - # so that it will sort properly. - $VERSION = '10.03'; -} +# Exports. +our @EXPORT_OK = qw( + $COVERAGE_LEVEL @COVERAGE_SKIP_TESTS @CRITIC_IGNORE $LIBRARY_PATH + $MINIMUM_VERSION %MINIMUM_VERSION @MODULE_VERSION_IGNORE + @POD_COVERAGE_EXCLUDE @SPDX_IGNORE @STRICT_IGNORE @STRICT_PREREQ +); # If C_TAP_BUILD or C_TAP_SOURCE are set in the environment, look for # data/perl.conf under those paths for a C Automake package. Otherwise, look @@ -58,10 +45,11 @@ our $COVERAGE_LEVEL = 100; our @COVERAGE_SKIP_TESTS; our @CRITIC_IGNORE; our $LIBRARY_PATH; -our $MINIMUM_VERSION = '5.010'; +our $MINIMUM_VERSION = '5.012'; our %MINIMUM_VERSION; our @MODULE_VERSION_IGNORE; our @POD_COVERAGE_EXCLUDE; +our @SPDX_IGNORE; our @STRICT_IGNORE; our @STRICT_PREREQ; @@ -76,7 +64,7 @@ __END__ =for stopwords Allbery rra-c-util Automake perlcritic .libs namespace subdirectory sublicense -MERCHANTABILITY NONINFRINGEMENT regexes +MERCHANTABILITY NONINFRINGEMENT regexes SPDX =head1 NAME @@ -159,6 +147,12 @@ testing. Normally, all methods have to be documented in the POD for a Perl module, but methods matching any of these regexes will be considered private and won't require documentation. +=item @SPDX_IGNORE + +Regexes that match files that should be excluded from SPDX license header +checks, in addition to the standard exclusions. The regular expression is +matched against the file path relative to the top of the source tree. + =item @STRICT_IGNORE Additional directories to ignore when doing recursive Test::Strict testing for @@ -183,11 +177,11 @@ Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 2015-2016, 2019, 2021 Russ Allbery - Copyright 2013-2014 The Board of Trustees of the Leland Stanford Junior University +Copyright 2015-2016, 2019, 2021, 2023-2024 Russ Allbery + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights diff --git a/cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm b/cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm index db758294222f..8c58ea65d42d 100644 --- a/cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm +++ b/cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm @@ -6,31 +6,19 @@ # # SPDX-License-Identifier: MIT -package Test::RRA::ModuleVersion; +package Test::RRA::ModuleVersion v11.0.0; -use 5.010; -use base qw(Exporter); -use strict; +use 5.012; +use autodie; use warnings; +use Exporter qw(import); use File::Find qw(find); use Test::More; use Test::RRA::Config qw(@MODULE_VERSION_IGNORE); -# Declare variables that should be set in BEGIN for robustness. -our (@EXPORT_OK, $VERSION); - -# Set $VERSION and everything export-related in a BEGIN block for robustness -# against circular module loading (not that we load any modules, but -# consistency is good). -BEGIN { - @EXPORT_OK = qw(test_module_versions update_module_versions); - - # This version should match the corresponding rra-c-util release, but with - # two digits for the minor version, including a leading zero if necessary, - # so that it will sort properly. - $VERSION = '10.03'; -} +# Exports. +our @EXPORT_OK = qw(test_module_versions update_module_versions); # A regular expression matching the version string for a module using the # package syntax from Perl 5.12 and later. $1 will contain all of the line @@ -48,26 +36,6 @@ our $REGEX_VERSION_PACKAGE = qr{ ) }xms; -# A regular expression matching a $VERSION string in a module. $1 will -# contain all of the line contents prior to the actual version string, $2 will -# contain the version itself, and $3 will contain the rest of the line. -our $REGEX_VERSION_OLD = qr{ - ( # prefix ($1) - \A .* # any prefix, such as "our" - [\$*] # scalar or typeglob - [\w\:\']*\b # optional package name - VERSION\b # version variable - \s* = \s* # assignment - ) - [\"\']? # optional leading quote - ( v? [\d._]+ ) # the version number itself ($2) - [\"\']? # optional trailing quote - ( # suffix ($3) - \s* - ; - ) -}xms; - # Find all the Perl modules shipped in this package, if any, and returns the # list of file names. # @@ -101,15 +69,15 @@ sub _module_files { # Throws: Text exception on I/O failure or inability to find version sub _module_version { my ($file) = @_; - open(my $data, q{<}, $file) or die "$0: cannot open $file: $!\n"; + open(my $data, q{<}, $file); while (defined(my $line = <$data>)) { - if ($line =~ $REGEX_VERSION_PACKAGE || $line =~ $REGEX_VERSION_OLD) { + if ($line =~ $REGEX_VERSION_PACKAGE) { my ($prefix, $version, $suffix) = ($1, $2, $3); - close($data) or die "$0: error reading from $file: $!\n"; + close($data); return $version; } } - close($data) or die "$0: error reading from $file: $!\n"; + close($data); die "$0: cannot find version number in $file\n"; } @@ -124,23 +92,12 @@ sub _module_version { sub _update_module_version { my ($file, $version) = @_; - # The old-style syntax may require different quoting. If the version - # starts with v, use it without quotes. Otherwise, quote it to prevent - # removal of trailing zeroes. - my $old_version = $version; - if ($old_version !~ m{ \A v }xms) { - $old_version = "'$old_version'"; - } - # Scan for the version and replace it. - open(my $in, q{<}, $file) or die "$0: cannot open $file: $!\n"; - open(my $out, q{>}, "$file.new") - or die "$0: cannot create $file.new: $!\n"; + open(my $in, q{<}, $file); + open(my $out, q{>}, "$file.new"); SCAN: while (defined(my $line = <$in>)) { - if ($line =~ s{ $REGEX_VERSION_PACKAGE }{$1$version$3}xms - || $line =~ s{ $REGEX_VERSION_OLD }{$1$old_version$3}xms) - { + if ($line =~ s{ $REGEX_VERSION_PACKAGE }{$1$version$3}xms) { print {$out} $line or die "$0: cannot write to $file.new: $!\n"; last SCAN; } @@ -149,12 +106,11 @@ sub _update_module_version { # Copy the rest of the input file to the output file. print {$out} <$in> or die "$0: cannot write to $file.new: $!\n"; - close($out) or die "$0: cannot flush $file.new: $!\n"; - close($in) or die "$0: error reading from $file: $!\n"; + close($out); + close($in); # All done. Rename the new file over top of the old file. - rename("$file.new", $file) - or die "$0: cannot rename $file.new to $file: $!\n"; + rename("$file.new", $file); return; } @@ -219,11 +175,11 @@ Test::RRA::ModuleVersion - Check Perl module versions for consistency use Test::RRA::ModuleVersion qw(test_module_versions update_module_versions); - # Ensure all modules under perl/lib have a version of 3.12. - test_module_versions('perl/lib', '3.12'); + # Ensure all modules under perl/lib have a version of v3.1.2. + test_module_versions('perl/lib', 'v3.1.2'); - # Update the version of those modules to 3.12. - update_module_versions('perl/lib', 3.12'); + # Update the version of those modules to v3.1.2. + update_module_versions('perl/lib', 'v3.1.2'); =head1 DESCRIPTION @@ -243,17 +199,21 @@ should be explicitly imported. =item test_module_versions(ROOT, VERSION) Tests the version of all Perl modules under ROOT to ensure they match VERSION, -reporting the results with Test::More. If the test configuration loaded by -Test::RRA::Config contains a @MODULE_VERSION_EXCLUDE variable, the module -files listed there will be ignored for this test. This function also sets up -a plan based on the number of modules, so should be the only testing function -called in a test script. +reporting the results with Test::More. VERSION should include any leading +C. + +If the test configuration loaded by Test::RRA::Config contains a +@MODULE_VERSION_EXCLUDE variable, the module files listed there will be +ignored for this test. + +This function sets up a plan based on the number of modules, so should be the +only testing function called in a test script. =item update_module_versions(ROOT, VERSION) Update the version of all Perl modules found under ROOT to VERSION, except for any listed in a @MODULE_VERSION_EXCLUDE variable set in the test configuration -loaded by Test::RRA::Config. +loaded by Test::RRA::Config. VERSION should include any leading C. =back @@ -263,7 +223,7 @@ Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 2016, 2018-2020, 2022 Russ Allbery +Copyright 2016, 2018-2020, 2022, 2024 Russ Allbery Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/cpan/podlators/t/man/devise-date.t b/cpan/podlators/t/man/devise-date.t index f211dcc94586..eefa4eeedcaf 100644 --- a/cpan/podlators/t/man/devise-date.t +++ b/cpan/podlators/t/man/devise-date.t @@ -1,19 +1,16 @@ #!/usr/bin/perl # -# In order for MakeMaker to build in the core, nothing can use Fcntl which -# includes POSIX. devise_date()'s use of strftime() was replaced. This tests -# that it's identical. It also tests special handling of the POD_MAN_DATE -# and SOURCE_DATE_EPOCH environment variables. +# Tests the handling of the date added to the man page header in the output of +# Pod::Man. # -# Copyright 2009, 2014-2015, 2018-2019, 2022 Russ Allbery +# Copyright 2009, 2014-2015, 2018-2019, 2022, 2024 Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use Pod::Man; @@ -28,11 +25,11 @@ local $ENV{POD_MAN_DATE} = undef; # Check that the results of device_date matches strftime. There is no input # file name, so this will use the current time. my $parser = Pod::Man->new; -is( - $parser->devise_date, - strftime('%Y-%m-%d', gmtime()), - 'devise_date matches strftime', -); +my $expected_old = strftime('%Y-%m-%d', gmtime()); +my $seen = $parser->devise_date(); +my $expected_new = strftime('%Y-%m-%d', gmtime()); +my $expected = ($seen eq $expected_old) ? $expected_old : $expected_new; +is($seen, $expected, 'devise_date matches strftime'); # Set the override environment variable and ensure that it's honored. local $ENV{POD_MAN_DATE} = '2014-01-01'; @@ -47,7 +44,7 @@ local $ENV{POD_MAN_DATE} = undef; local $ENV{SOURCE_DATE_EPOCH} = 1439390140; is($parser->devise_date, '2015-08-12', 'devise_date honors SOURCE_DATE_EPOCH'); -# Check that POD_MAN_DATE overrides SOURCE_DATE_EPOCH +# Check that POD_MAN_DATE overrides SOURCE_DATE_EPOCH. local $ENV{POD_MAN_DATE} = '2013-01-01'; local $ENV{SOURCE_DATE_EPOCH} = 1482676620; is( @@ -55,11 +52,17 @@ is( 'devise_date honors POD_MAN_DATE over SOURCE_DATE_EPOCH', ); -# Check that an invalid SOURCE_DATE_EPOCH is not accepted +# Check that an invalid SOURCE_DATE_EPOCH is not accepted and the code falls +# back on using the current time. Be careful to avoid false failures if the +# test is run exactly at the transition from one day to the next. local $ENV{POD_MAN_DATE} = undef; local $ENV{SOURCE_DATE_EPOCH} = '1482676620B'; +$expected_old = strftime('%Y-%m-%d', gmtime()); +$seen = $parser->devise_date(); +$expected_new = strftime('%Y-%m-%d', gmtime()); +$expected = ($seen eq $expected_old) ? $expected_old : $expected_new; is( $parser->devise_date, - strftime('%Y-%m-%d', gmtime()), + $expected, 'devise_date ignores invalid SOURCE_DATE_EPOCH', ); diff --git a/cpan/podlators/t/man/devise-title.t b/cpan/podlators/t/man/devise-title.t index b2e82468b47a..90b6d7a0b075 100644 --- a/cpan/podlators/t/man/devise-title.t +++ b/cpan/podlators/t/man/devise-title.t @@ -3,15 +3,14 @@ # Tests for the automatic determination of the manual page title if not # specified via options to pod2man or the Pod::Man constructor. # -# Copyright 2015-2016, 2018-2019 Russ Allbery +# Copyright 2015-2016, 2018-2019, 2024 Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use File::Spec; diff --git a/cpan/podlators/t/man/empty.t b/cpan/podlators/t/man/empty.t index 3c6ef23f48a3..165b81ec5b47 100644 --- a/cpan/podlators/t/man/empty.t +++ b/cpan/podlators/t/man/empty.t @@ -2,15 +2,14 @@ # # Test Pod::Man with a document that produces only errors. # -# Copyright 2013, 2016, 2018-2019, 2022 Russ Allbery +# Copyright 2013, 2016, 2018-2019, 2022, 2024 Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.010; -use strict; +use 5.012; use warnings; use Test::More tests => 8; @@ -41,7 +40,8 @@ is($@, q{}, '...with no errors'); # With recent Pod::Simple, there will be a POD ERRORS section. With older # versions of Pod::Simple, we have to skip the test since it doesn't trigger # this problem. -SKIP: { +SKIP: +{ if ($output eq q{}) { skip('Pod::Simple does not produce errors for invalid commands', 1); } @@ -57,7 +57,8 @@ ok(eval { $parser->parse_string_document('=cut') }, 'Parsed =cut document'); is($@, q{}, '...with no errors'); # Same check for a POD ERRORS section. -SKIP: { +SKIP: +{ if ($output eq q{}) { skip('Pod::Simple does not produce errors for invalid commands', 1); } diff --git a/cpan/podlators/t/man/encoding.t b/cpan/podlators/t/man/encoding.t index 3b658bff5ed2..36e86e603a85 100644 --- a/cpan/podlators/t/man/encoding.t +++ b/cpan/podlators/t/man/encoding.t @@ -11,15 +11,14 @@ # for any changes to Pod::Man. It doubles as a test that the preamble is # emitted correctly. # -# Copyright 2022 Russ Allbery +# Copyright 2022, 2024 Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; @@ -38,21 +37,19 @@ local $ENV{SOURCE_DATE_EPOCH} = 1664146047; # Get the path to the input and output files. my $input = File::Spec->catfile('t', 'data', 'man', 'encoding.pod'); -#<<< my %output = ( groff => File::Spec->catfile('t', 'data', 'man', 'encoding.groff'), roff => File::Spec->catfile('t', 'data', 'man', 'encoding.roff'), utf8 => File::Spec->catfile('t', 'data', 'man', 'encoding.utf8'), ); -#>>> # For each encoding, load the input, generate the output, and check that the # output matches. for my $encoding (sort(keys(%output))) { my $parser = Pod::Man->new( encoding => $encoding, - center => 'podlators', - release => 'testing', + center => 'podlators', + release => 'testing', ); my $got; $parser->output_string(\$got); diff --git a/cpan/podlators/t/man/heading.t b/cpan/podlators/t/man/heading.t index dea3176670f5..c6b37d501320 100644 --- a/cpan/podlators/t/man/heading.t +++ b/cpan/podlators/t/man/heading.t @@ -2,7 +2,7 @@ # # Additional tests for Pod::Man heading generation. # -# Copyright 2002, 2004, 2006, 2008-2009, 2012, 2015, 2018-2019, 2022 +# Copyright 2002, 2004, 2006, 2008-2009, 2012, 2015, 2018-2019, 2022, 2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it @@ -10,8 +10,7 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/man/iso-8859-1.t b/cpan/podlators/t/man/iso-8859-1.t index 1c0c996a32d7..535dbe9fa657 100644 --- a/cpan/podlators/t/man/iso-8859-1.t +++ b/cpan/podlators/t/man/iso-8859-1.t @@ -2,15 +2,14 @@ # # Test Pod::Man ISO-8859-1 handling # -# Copyright 2016, 2019, 2022 Russ Allbery +# Copyright 2016, 2019, 2022, 2024 Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/man/no-encode.t b/cpan/podlators/t/man/no-encode.t index 108e0b31065d..93ce56725768 100644 --- a/cpan/podlators/t/man/no-encode.t +++ b/cpan/podlators/t/man/no-encode.t @@ -3,15 +3,14 @@ # Test for graceful degradation to non-UTF-8 output without Encode module. # # Copyright 2016 Niko Tyni -# Copyright 2016, 2018-2019, 2022 Russ Allbery +# Copyright 2016, 2018-2019, 2022, 2024 Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.010; -use strict; +use 5.012; use warnings; use Carp qw(croak); diff --git a/cpan/podlators/t/man/snippets.t b/cpan/podlators/t/man/snippets.t index dbdb8a63df52..f29b809229dd 100644 --- a/cpan/podlators/t/man/snippets.t +++ b/cpan/podlators/t/man/snippets.t @@ -2,7 +2,8 @@ # # Test Pod::Man behavior with various snippets. # -# Copyright 2002, 2004, 2006, 2008-2009, 2012-2013, 2015-2016, 2018-2020, 2022 +# Copyright 2002, 2004, 2006, 2008-2009, 2012-2013, 2015-2016, 2018-2020, +# 2022-2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it @@ -10,13 +11,12 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; -use Test::More tests => 113; +use Test::More tests => 115; use Test::Podlators qw(test_snippet); # Load the module. @@ -30,8 +30,8 @@ my @snippets = qw( c-in-name dollar-magic error-die error-none error-normal error-pod error-stderr error-stderr-opt eth fixed-font fixed-font-in-item for-blocks guesswork guesswork-all guesswork-no-quoting guesswork-none - guesswork-partial guesswork-quoting hyphen-in-s item-fonts language - link-quoting link-to-url long-quote lquote-and-quote lquote-rquote + guesswork-partial guesswork-quoting item-fonts item-spacing language + link-quoting link-to-url long-quote lquote-and-quote lquote-rquote man-l markup-in-name multiline-x naive naive-groff name-guesswork name-quotes name-quotes-none nested-lists newlines-in-c non-ascii nonbreaking-space-l not-bullet not-numbers nourls periods quote-escaping rquote-none diff --git a/cpan/podlators/t/man/utf8-io.t b/cpan/podlators/t/man/utf8-io.t index a3a401f16e34..439dc849aeb6 100644 --- a/cpan/podlators/t/man/utf8-io.t +++ b/cpan/podlators/t/man/utf8-io.t @@ -2,7 +2,7 @@ # # Test Pod::Man UTF-8 handling, with and without PerlIO. # -# Copyright 2002, 2004, 2006, 2008-2010, 2012, 2014-2015, 2018-2020, 2022 +# Copyright 2002, 2004, 2006, 2008-2010, 2012, 2014-2015, 2018-2020, 2022, 2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it @@ -10,8 +10,7 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/parselink/basic.t b/cpan/podlators/t/parselink/basic.t index 7b7edeeeb596..d47808da9c8f 100644 --- a/cpan/podlators/t/parselink/basic.t +++ b/cpan/podlators/t/parselink/basic.t @@ -2,15 +2,14 @@ # # Tests for Pod::ParseLink. # -# Copyright 2001, 2009, 2018, 2020, 2022 by Russ Allbery +# Copyright 2001, 2009, 2018, 2020, 2022, 2024 by Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use Test::More tests => 28; diff --git a/cpan/podlators/t/style/critic.t b/cpan/podlators/t/style/critic.t index 71c3db4e564c..eed353c76d32 100644 --- a/cpan/podlators/t/style/critic.t +++ b/cpan/podlators/t/style/critic.t @@ -7,7 +7,7 @@ # files, junk, and any files explicitly configured to be ignored. # # Written by Russ Allbery -# Copyright 2019-2022 Russ Allbery +# Copyright 2019-2024 Russ Allbery # Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -31,8 +31,7 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; use warnings; use lib 't/lib'; @@ -58,13 +57,19 @@ Test::Perl::Critic->import(-profile => 't/data/perlcriticrc'); # By default, Test::Perl::Critic only checks blib. We also want to check t, # Build.PL, and examples. -my @files = Perl::Critic::Utils::all_perl_files('blib'); -if (!@files) { +my @files; +if (-d 'blib') { + @files = Perl::Critic::Utils::all_perl_files('blib'); +} +if (!@files && -d 'lib') { @files = Perl::Critic::Utils::all_perl_files('lib'); } if (-e 'Build.PL') { push(@files, 'Build.PL'); } +if (-e 'Makefile.PL') { + push(@files, 'Makefile.PL'); +} for my $dir (qw(examples usr t)) { if (-d $dir) { push(@files, Perl::Critic::Utils::all_perl_files($dir)); diff --git a/cpan/podlators/t/style/kwalitee.t b/cpan/podlators/t/style/kwalitee.t index 65b6964777fd..945dab3e0d6c 100644 --- a/cpan/podlators/t/style/kwalitee.t +++ b/cpan/podlators/t/style/kwalitee.t @@ -6,7 +6,7 @@ # which can be found at . # # Written by Russ Allbery -# Copyright 2022 Russ Allbery +# Copyright 2022, 2024 Russ Allbery # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -28,8 +28,7 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/style/minimum-version.t b/cpan/podlators/t/style/minimum-version.t index 6a5aa8917c83..c45a3d491bf3 100644 --- a/cpan/podlators/t/style/minimum-version.t +++ b/cpan/podlators/t/style/minimum-version.t @@ -6,7 +6,7 @@ # which can be found at . # # Written by Russ Allbery -# Copyright 2019, 2021 Russ Allbery +# Copyright 2019, 2021, 2024 Russ Allbery # Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -30,8 +30,7 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/style/module-version.t b/cpan/podlators/t/style/module-version.t index 2601f810581b..284ad34c4805 100644 --- a/cpan/podlators/t/style/module-version.t +++ b/cpan/podlators/t/style/module-version.t @@ -11,8 +11,8 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; +use autodie; use warnings; use lib 't/lib'; @@ -81,9 +81,9 @@ B [B<--update>] =head1 REQUIREMENTS -Perl 5.8 or later, the Perl6::Slurp module, and the JSON::PP Perl module, both -of which are available from CPAN. JSON::PP is also included in Perl core in -Perl 5.14 and later. +Perl 5.12 or later, the Perl6::Slurp module, and the JSON::PP Perl module, +both of which are available from CPAN. JSON::PP is also included in Perl core +in Perl 5.14 and later. =head1 DESCRIPTION @@ -121,11 +121,11 @@ Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 2014-2016, 2019-2021 Russ Allbery - Copyright 2013-2014 The Board of Trustees of the Leland Stanford Junior University +Copyright 2014-2016, 2019-2021, 2024 Russ Allbery + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights diff --git a/cpan/podlators/t/style/obsolete-strings.t b/cpan/podlators/t/style/obsolete-strings.t index cd028de6a733..447b667a5492 100644 --- a/cpan/podlators/t/style/obsolete-strings.t +++ b/cpan/podlators/t/style/obsolete-strings.t @@ -9,7 +9,7 @@ # The canonical version of this file is maintained in the rra-c-util package, # which can be found at . # -# Copyright 2016, 2018-2021 Russ Allbery +# Copyright 2016, 2018-2021, 2024 Russ Allbery # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -31,8 +31,8 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; +use autodie; use warnings; use lib 't/lib'; @@ -43,7 +43,10 @@ use File::Find qw(find); use Test::More; # Bad patterns to search for. -my @BAD_REGEXES = (qr{ http:// \S+ [.]eyrie[.]org }xms); +my @BAD_REGEXES = ( + qr{ http:// \S+ [.]eyrie[.]org }xms, + qr{ \$VERSION \s+ = \s+ }xms, +); my @BAD_STRINGS = qw(rra@stanford.edu RRA_MAINTAINER_TESTS); # File or directory names to always skip. @@ -69,24 +72,24 @@ sub check_file { return if !-T $filename; # Scan the file. - open(my $fh, '<', $filename) or BAIL_OUT("Cannot open $File::Find::name"); + open(my $fh, '<', $filename); while (defined(my $line = <$fh>)) { for my $regex (@BAD_REGEXES) { if ($line =~ $regex) { ok(0, "$File::Find::name contains $regex"); - close($fh) or BAIL_OUT("Cannot close $File::Find::name"); + close($fh); return; } } for my $string (@BAD_STRINGS) { if (index($line, $string) != -1) { ok(0, "$File::Find::name contains $string"); - close($fh) or BAIL_OUT("Cannot close $File::Find::name"); + close($fh); return; } } } - close($fh) or BAIL_OUT("Cannot close $File::Find::name"); + close($fh); ok(1, $File::Find::name); return; } diff --git a/cpan/podlators/t/style/strict.t b/cpan/podlators/t/style/strict.t index a2f5b990e135..43638fe68f44 100644 --- a/cpan/podlators/t/style/strict.t +++ b/cpan/podlators/t/style/strict.t @@ -6,7 +6,7 @@ # which can be found at . # # Written by Russ Allbery -# Copyright 2016, 2018-2021 Russ Allbery +# Copyright 2016, 2018-2021, 2024 Russ Allbery # Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -30,8 +30,8 @@ # # SPDX-License-Identifier: MIT -use 5.010; -use strict; +use 5.012; +use autodie; use warnings; use lib 't/lib'; @@ -48,7 +48,7 @@ skip_unless_automated('Strictness tests'); use_prereq('Test::Strict', '0.25'); # Directories to exclude from checks. -my %EXCLUDE = map { $_ => 1 } qw(.git blib); +my %EXCLUDE = map { $_ => 1 } qw(.git blib local); # Determine whether we want to check the given file or top-level directory. # Assume that the only interesting files at the top level are directories or @@ -71,10 +71,9 @@ sub should_check { # case when using dgit). We therefore can't just point it at the root of the # module distribution and instead have to manually construct a list of # interesting files. -opendir(my $rootdir, File::Spec->curdir) - or die "$0: cannot open current directory: $!\n"; +opendir(my $rootdir, File::Spec->curdir); my @files = File::Spec->no_upwards(readdir($rootdir)); -closedir($rootdir) or die "$0: cannot close current directory: $!\n"; +closedir($rootdir); my @to_check = grep { should_check($_) } @files; # Test the files and top-level directories we found, including checking for diff --git a/cpan/podlators/t/text/color.t b/cpan/podlators/t/text/color.t index aa75beeb0571..e0edb7902d2d 100644 --- a/cpan/podlators/t/text/color.t +++ b/cpan/podlators/t/text/color.t @@ -2,19 +2,18 @@ # # Test Pod::Text::Color behavior with various snippets. # -# Copyright 2002, 2004, 2006, 2009, 2012-2013, 2018-2019 +# Copyright 2002, 2004, 2006, 2009, 2012-2013, 2018-2019, 2023-2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; -use Test::More tests => 11; +use Test::More tests => 13; use Test::Podlators qw(test_snippet); # Load the module. @@ -22,8 +21,13 @@ BEGIN { use_ok('Pod::Text::Color'); } +# Ensure color is enabled for testing purposes. +delete $ENV{NO_COLOR}; + # List of snippets run by this test. -my @snippets = qw(escape-wrapping tag-width tag-wrapping width wrapping); +my @snippets = qw( + escape-wrapping nonbreaking-wrap tag-width tag-wrapping width wrapping +); # Run all the tests. for my $snippet (@snippets) { diff --git a/cpan/podlators/t/text/invalid.t b/cpan/podlators/t/text/invalid.t index f6e6c6e4e20e..d75786773ac6 100644 --- a/cpan/podlators/t/text/invalid.t +++ b/cpan/podlators/t/text/invalid.t @@ -6,15 +6,14 @@ # section, which previously led to internal errors because state variables # weren't properly initialized. See CPAN RT #88724. # -# Copyright 2013, 2018, 2020, 2022 Russ Allbery +# Copyright 2013, 2018, 2020, 2022, 2024 Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.010; -use strict; +use 5.012; use warnings; use Test::More tests => 8; diff --git a/cpan/podlators/t/text/iso-8859-1.t b/cpan/podlators/t/text/iso-8859-1.t index d48378bad891..872115b02691 100644 --- a/cpan/podlators/t/text/iso-8859-1.t +++ b/cpan/podlators/t/text/iso-8859-1.t @@ -2,15 +2,14 @@ # # Test Pod::Text ISO-8859-1 handling # -# Copyright 2016, 2019, 2022 Russ Allbery +# Copyright 2016, 2019, 2022, 2024 Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; diff --git a/cpan/podlators/t/text/overstrike.t b/cpan/podlators/t/text/overstrike.t index 7cdaa538b2d5..16bd29de9b69 100644 --- a/cpan/podlators/t/text/overstrike.t +++ b/cpan/podlators/t/text/overstrike.t @@ -2,7 +2,7 @@ # # Test Pod::Text::Overstrike with various snippets. # -# Copyright 2002, 2004, 2006, 2009, 2012-2013, 2018-2019 +# Copyright 2002, 2004, 2006, 2009, 2012-2013, 2018-2019, 2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it @@ -10,13 +10,12 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; -use Test::More tests => 5; +use Test::More tests => 7; use Test::Podlators qw(test_snippet); BEGIN { @@ -24,7 +23,7 @@ BEGIN { } # List of snippets run by this test. -my @snippets = qw(tag-width wrapping); +my @snippets = qw(nonbreaking-wrap tag-width wrapping); # Run all the tests. for my $snippet (@snippets) { diff --git a/cpan/podlators/t/text/snippets.t b/cpan/podlators/t/text/snippets.t index d8eb46a2c909..83e8ad0cccf9 100644 --- a/cpan/podlators/t/text/snippets.t +++ b/cpan/podlators/t/text/snippets.t @@ -2,7 +2,7 @@ # # Test Pod::Text behavior with various snippets. # -# Copyright 2002, 2004, 2006-2009, 2012, 2018-2020, 2022 +# Copyright 2002, 2004, 2006-2009, 2012, 2018-2020, 2022, 2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it @@ -10,13 +10,12 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; -use Test::More tests => 67; +use Test::More tests => 69; use Test::Podlators qw(test_snippet); # Load the module. @@ -30,8 +29,8 @@ my @snippets = qw( error-pod error-stderr error-stderr-opt for guesswork-quoting guesswork-no-quoting late-encoding link-rt link-url margin naive name-quotes name-quotes-none non-latin nonbreaking-space - nonbreaking-space-l nourls periods quotes-opt s-whitespace - sentence-spacing utf8 verbatim + nonbreaking-space-l nonbreaking-wrap nourls periods quotes-opt + s-whitespace sentence-spacing utf8 verbatim ); # Run all the tests. diff --git a/cpan/podlators/t/text/termcap.t b/cpan/podlators/t/text/termcap.t index 33ce757d423c..57688ed1c954 100644 --- a/cpan/podlators/t/text/termcap.t +++ b/cpan/podlators/t/text/termcap.t @@ -2,7 +2,7 @@ # # Test Pod::Text::Termcap behavior with various snippets. # -# Copyright 2002, 2004, 2006, 2009, 2012-2014, 2018-2019, 2022 +# Copyright 2002, 2004, 2006, 2009, 2012-2014, 2018-2019, 2022, 2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it @@ -10,13 +10,12 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib'; -use Test::More tests => 15; +use Test::More tests => 17; use Test::Podlators qw(test_snippet); # Load the module. @@ -35,7 +34,9 @@ my $parser = Pod::Text::Termcap->new(); is($parser->format_regex(), "\\\e\\[1m|\\\e\\[4m|\\\e\\[m", 'Character regex'); # List of snippets run by this test. -my @snippets = qw(escape-wrapping tag-width tag-wrapping width wrapping); +my @snippets = qw( + escape-wrapping nonbreaking-wrap tag-width tag-wrapping width wrapping +); # Run all the tests. for my $snippet (@snippets) { diff --git a/cpan/podlators/t/text/utf8-io.t b/cpan/podlators/t/text/utf8-io.t index ff5dde57bae3..b09a683d9334 100644 --- a/cpan/podlators/t/text/utf8-io.t +++ b/cpan/podlators/t/text/utf8-io.t @@ -2,7 +2,7 @@ # # Test Pod::Text UTF-8 handling, with and without PerlIO. # -# Copyright 2002, 2004, 2006-2010, 2012, 2014, 2018, 2020, 2022 +# Copyright 2002, 2004, 2006-2010, 2012, 2014, 2018, 2020, 2022, 2024 # Russ Allbery # # This program is free software; you may redistribute it and/or modify it @@ -10,8 +10,7 @@ # # SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl -use 5.008; -use strict; +use 5.012; use warnings; use lib 't/lib';