summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2017-12-26 13:48:01 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2017-12-26 14:14:30 +0000
commit1abe70d82a813f037be793cff289f7444508418b (patch)
tree9858dfdd5fc78034d543dc0b016889a86fb07dea /cpan
parent8eedd56d9009ca69ce37b927d25159b5f3ce7552 (diff)
downloadperl-1abe70d82a813f037be793cff289f7444508418b.tar.gz
Update podlators to CPAN version 4.10
[DELTA] podlators 4.10 (2017-12-25) [Pod::Man] Change man page references and function names to bold instead of italic, following the current Linux man page standard. The previous formatting was taken from Solaris, and it seems safe to say that the Linux man page formatting conventions are now much more widely followed than Solaris's. Patch from Guillem Jover. [Pod::Man] Revert the .IX handling code to the earlier version from Bjarni Ingi Gislason but add the trailing backslashes that should hopefully avoid blank page issues on HP-UX. This fixes a warning regression when man is run with warnings enabled. (Debian Bug#847972) [Pod::Man] Wrap the output file descriptor in a glob before passing it to PerlIO::get_layers so that the layer check works properly. Previously, this code would throw a warning if given a scalar not wrapped in a glob and not detect layers properly. Patch from Zefram. (#122521) Produce a proper diagnostic when given empty input on standard input with no other arguments to pod2man or pod2text. Reported by Guillem Jover.
Diffstat (limited to 'cpan')
-rw-r--r--cpan/podlators/lib/Pod/Man.pm48
-rw-r--r--cpan/podlators/lib/Pod/ParseLink.pm2
-rw-r--r--cpan/podlators/lib/Pod/Text.pm4
-rw-r--r--cpan/podlators/lib/Pod/Text/Color.pm2
-rw-r--r--cpan/podlators/lib/Pod/Text/Overstrike.pm4
-rw-r--r--cpan/podlators/lib/Pod/Text/Termcap.pm2
-rw-r--r--cpan/podlators/scripts/pod2man.PL10
-rw-r--r--cpan/podlators/scripts/pod2text.PL10
-rw-r--r--cpan/podlators/t/data/basic.cap4
-rw-r--r--cpan/podlators/t/data/basic.clr4
-rw-r--r--cpan/podlators/t/data/basic.man4
-rw-r--r--cpan/podlators/t/data/basic.ovr4
-rw-r--r--cpan/podlators/t/data/basic.pod4
-rw-r--r--cpan/podlators/t/data/basic.txt4
-rw-r--r--cpan/podlators/t/data/snippets/man/error-stderr2
-rw-r--r--cpan/podlators/t/data/snippets/man/soft-hyphens6
-rw-r--r--cpan/podlators/t/docs/pod-spelling.t2
-rw-r--r--cpan/podlators/t/docs/pod.t2
-rw-r--r--cpan/podlators/t/docs/synopsis.t2
-rw-r--r--cpan/podlators/t/lib/Test/RRA.pm51
-rw-r--r--cpan/podlators/t/lib/Test/RRA/Config.pm6
-rw-r--r--cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm4
-rw-r--r--cpan/podlators/t/style/minimum-version.t2
-rw-r--r--cpan/podlators/t/style/module-version.t2
-rw-r--r--cpan/podlators/t/style/strict.t8
-rw-r--r--cpan/podlators/t/text/options.t2
26 files changed, 128 insertions, 67 deletions
diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
index 886f614c7e..a737e5b3e9 100644
--- a/cpan/podlators/lib/Pod/Man.pm
+++ b/cpan/podlators/lib/Pod/Man.pm
@@ -14,7 +14,7 @@
# Written by Russ Allbery <rra@cpan.org>
# Substantial contributions by Sean Burke <sburke@cpan.org>
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-# 2010, 2012, 2013, 2014, 2015, 2016 Russ Allbery <rra@cpan.org>
+# 2010, 2012, 2013, 2014, 2015, 2016, 2017 Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -43,7 +43,7 @@ BEGIN {
@ISA = qw(Pod::Simple);
-$VERSION = '4.09';
+$VERSION = '4.10';
# Set the debugging level. If someone has inserted a debug function into this
# class already, use that. Otherwise, use any Pod::Simple debug function
@@ -535,8 +535,8 @@ sub guesswork {
# strings inserted around things that we've made small-caps if later
# transforms should work on those strings.
- # Italicize functions in the form func(), including functions that are in
- # all capitals, but don't italize if there's anything between the parens.
+ # Embolden functions in the form func(), including functions that are in
+ # all capitals, but don't embolden if there's anything between the parens.
# The function must start with an alphabetic character or underscore and
# then consist of word characters or colons.
if ($$self{MAGIC_FUNC}) {
@@ -544,11 +544,11 @@ sub guesswork {
( \b | \\s-1 )
( [A-Za-z_] ([:\w] | \\s-?[01])+ \(\) )
} {
- $1 . '\f(IS' . $2 . '\f(IE'
+ $1 . '\f(BS' . $2 . '\f(BE'
}egx;
}
- # Change references to manual pages to put the page name in italics but
+ # Change references to manual pages to put the page name in bold but
# the number in the regular font, with a thin space between the name and
# the number. Only recognize func(n) where func starts with an alphabetic
# character or underscore and contains only word characters, periods (for
@@ -562,7 +562,7 @@ sub guesswork {
( [A-Za-z_] (?:[.:\w] | \\- | \\s-?[01])+ )
( \( \d [a-z]* \) )
} {
- $1 . '\f(IS' . $2 . '\f(IE\|' . $3
+ $1 . '\f(BS' . $2 . '\f(BE\|' . $3
}egx;
}
@@ -800,13 +800,16 @@ sub start_document {
# has a PerlIO encoding layer set. If it does not, we'll need to encode
# our output before printing it (handled in the output() sub). Wrap the
# check in an eval to handle versions of Perl without PerlIO.
+ #
+ # PerlIO::get_layers still requires its argument be a glob, so coerce the
+ # file handle to a glob.
$$self{ENCODE} = 0;
if ($$self{utf8}) {
$$self{ENCODE} = 1;
eval {
my @options = (output => 1, details => 1);
- my $flag = (PerlIO::get_layers ($$self{output_fh}, @options))[-1];
- if ($flag & PerlIO::F_UTF8 ()) {
+ my @layers = PerlIO::get_layers (*{$$self{output_fh}}, @options);
+ if ($layers[-1] & PerlIO::F_UTF8 ()) {
$$self{ENCODE} = 0;
}
}
@@ -934,7 +937,7 @@ sub devise_title {
#
# If POD_MAN_DATE is set, that overrides anything else. This can be used for
# reproducible generation of the same file even if the input file timestamps
-# are unpredictable or the POD coms from standard input.
+# are unpredictable or the POD comes from standard input.
#
# Otherwise, if SOURCE_DATE_EPOCH is set and can be parsed as seconds since
# the UNIX epoch, base the timestamp on that. See
@@ -1392,7 +1395,7 @@ sub parse_from_file {
my $self = shift;
$self->reinit;
- # Fake the old cutting option to Pod::Parser. This fiddings with internal
+ # Fake the old cutting option to Pod::Parser. This fiddles with internal
# Pod::Simple state and is quite ugly; we need a better approach.
if (ref ($_[0]) eq 'HASH') {
my $opts = shift @_;
@@ -1553,16 +1556,20 @@ sub preamble_template {
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
-.if !\nF .nr F 0
-.if \nF>0 \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
..
-. if !\nF==2 \{\
-. nr % 0
-. nr F 2
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
. \}
.\}
+.rr rF
----END OF PREAMBLE----
#'# for cperl-mode
@@ -2016,7 +2023,7 @@ mine).
=head1 COPYRIGHT AND LICENSE
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-2009, 2010, 2012, 2013, 2014, 2015, 2016 Russ Allbery <rra@cpan.org>
+2009, 2010, 2012, 2013, 2014, 2015, 2016, 2017 Russ Allbery <rra@cpan.org>
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
@@ -2029,8 +2036,7 @@ L<man(1)>, L<man(7)>
Ossanna, Joseph F., and Brian W. Kernighan. "Troff User's Manual,"
Computing Science Technical Report No. 54, AT&T Bell Laboratories. This is
the best documentation of standard B<nroff> and B<troff>. At the time of
-this writing, it's available at
-L<http://www.cs.bell-labs.com/cm/cs/cstr.html>.
+this writing, it's available at L<http://www.troff.org/54.pdf>.
The man page documenting the man macro set may be L<man(5)> instead of
L<man(7)> on your system. Also, please see L<pod2man(1)> for extensive
diff --git a/cpan/podlators/lib/Pod/ParseLink.pm b/cpan/podlators/lib/Pod/ParseLink.pm
index 9a37a0532c..9a1627079b 100644
--- a/cpan/podlators/lib/Pod/ParseLink.pm
+++ b/cpan/podlators/lib/Pod/ParseLink.pm
@@ -31,7 +31,7 @@ use Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(parselink);
-$VERSION = '4.09';
+$VERSION = '4.10';
##############################################################################
# Implementation
diff --git a/cpan/podlators/lib/Pod/Text.pm b/cpan/podlators/lib/Pod/Text.pm
index 211de5a7de..f73b4af2b9 100644
--- a/cpan/podlators/lib/Pod/Text.pm
+++ b/cpan/podlators/lib/Pod/Text.pm
@@ -39,7 +39,7 @@ use Pod::Simple ();
# We have to export pod2text for backward compatibility.
@EXPORT = qw(pod2text);
-$VERSION = '4.09';
+$VERSION = '4.10';
# 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.
@@ -707,7 +707,7 @@ sub parse_from_file {
my $self = shift;
$self->reinit;
- # Fake the old cutting option to Pod::Parser. This fiddings with internal
+ # Fake the old cutting option to Pod::Parser. This fiddles with internal
# Pod::Simple state and is quite ugly; we need a better approach.
if (ref ($_[0]) eq 'HASH') {
my $opts = shift @_;
diff --git a/cpan/podlators/lib/Pod/Text/Color.pm b/cpan/podlators/lib/Pod/Text/Color.pm
index a26e43db81..fa1aadb463 100644
--- a/cpan/podlators/lib/Pod/Text/Color.pm
+++ b/cpan/podlators/lib/Pod/Text/Color.pm
@@ -27,7 +27,7 @@ use vars qw(@ISA $VERSION);
@ISA = qw(Pod::Text);
-$VERSION = '4.09';
+$VERSION = '4.10';
##############################################################################
# Overrides
diff --git a/cpan/podlators/lib/Pod/Text/Overstrike.pm b/cpan/podlators/lib/Pod/Text/Overstrike.pm
index f611a4225b..d0ce7680aa 100644
--- a/cpan/podlators/lib/Pod/Text/Overstrike.pm
+++ b/cpan/podlators/lib/Pod/Text/Overstrike.pm
@@ -35,13 +35,13 @@ use Pod::Text ();
@ISA = qw(Pod::Text);
-$VERSION = '4.09';
+$VERSION = '4.10';
##############################################################################
# Overrides
##############################################################################
-# Make level one headings bold, overridding any existing formatting.
+# Make level one headings bold, overriding any existing formatting.
sub cmd_head1 {
my ($self, $attrs, $text) = @_;
$text =~ s/\s+$//;
diff --git a/cpan/podlators/lib/Pod/Text/Termcap.pm b/cpan/podlators/lib/Pod/Text/Termcap.pm
index 91939331f8..f015cfce59 100644
--- a/cpan/podlators/lib/Pod/Text/Termcap.pm
+++ b/cpan/podlators/lib/Pod/Text/Termcap.pm
@@ -28,7 +28,7 @@ use vars qw(@ISA $VERSION);
@ISA = qw(Pod::Text);
-$VERSION = '4.09';
+$VERSION = '4.10';
##############################################################################
# Overrides
diff --git a/cpan/podlators/scripts/pod2man.PL b/cpan/podlators/scripts/pod2man.PL
index b70057be86..3f19b791d5 100644
--- a/cpan/podlators/scripts/pod2man.PL
+++ b/cpan/podlators/scripts/pod2man.PL
@@ -47,7 +47,7 @@ print {$out} <<'SCRIPT_BODY' or die "Cannot write to $file: $!\n";
# pod2man -- Convert POD data to formatted *roff input.
#
# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014, 2015,
-# 2016 Russ Allbery <rra@cpan.org>
+# 2016, 2017 Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -113,7 +113,11 @@ do {
$parser->parse_from_file (@files);
if ($parser->{CONTENTLESS}) {
$status = 1;
- warn "$0: unable to format $files[0]\n";
+ 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]);
}
@@ -428,7 +432,7 @@ B<pod2man> by Larry Wall and Tom Christiansen.
=head1 COPYRIGHT AND LICENSE
Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014,
-2015, 2016 Russ Allbery <rra@cpan.org>
+2015, 2016, 2017 Russ Allbery <rra@cpan.org>
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/pod2text.PL b/cpan/podlators/scripts/pod2text.PL
index f6c80715b9..d1a146e8f0 100644
--- a/cpan/podlators/scripts/pod2text.PL
+++ b/cpan/podlators/scripts/pod2text.PL
@@ -47,7 +47,7 @@ print {$out} <<'SCRIPT_BODY' or die "Cannot write to $file: $!\n";
# pod2text -- Convert POD data to formatted ASCII text.
#
# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014, 2015,
-# 2016 Russ Allbery <rra@cpan.org>
+# 2016, 2017 Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -123,7 +123,11 @@ do {
$parser->parse_from_file ($input, $output);
if ($parser->{CONTENTLESS}) {
$status = 1;
- warn "$0: unable to format $input\n";
+ if (defined $input) {
+ warn "$0: unable to format $input\n";
+ } else {
+ warn "$0: unable to format standard input\n";
+ }
if (defined ($output) and $output ne '-') {
unlink $output unless (-s $output);
}
@@ -358,7 +362,7 @@ Russ Allbery <rra@cpan.org>.
=head1 COPYRIGHT AND LICENSE
Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013, 2014, 2015,
-2016 Russ Allbery <rra@cpan.org>
+2016, 2017 Russ Allbery <rra@cpan.org>
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.cap b/cpan/podlators/t/data/basic.cap
index a595343248..d580ed89dc 100644
--- a/cpan/podlators/t/data/basic.cap
+++ b/cpan/podlators/t/data/basic.cap
@@ -172,12 +172,12 @@
Of course I should still be able to do all this with escape sequences too:
"$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
- Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
+ Don't forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
And make sure that 0 works too!
Now, if I use << or >> as my delimiters, then I have to use whitespace. So
- things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end up
+ things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> won't end up
doing what you might expect since the first > will still terminate the
first < seen.
diff --git a/cpan/podlators/t/data/basic.clr b/cpan/podlators/t/data/basic.clr
index da6acf234d..f9591c87d6 100644
--- a/cpan/podlators/t/data/basic.clr
+++ b/cpan/podlators/t/data/basic.clr
@@ -173,12 +173,12 @@
Of course I should still be able to do all this with escape sequences
too: "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
- Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
+ Don't forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
And make sure that 0 works too!
Now, if I use << or >> as my delimiters, then I have to use whitespace.
- So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end
+ So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> won't end
up doing what you might expect since the first > will still terminate
the first < seen.
diff --git a/cpan/podlators/t/data/basic.man b/cpan/podlators/t/data/basic.man
index e11546fb74..871bd923fd 100644
--- a/cpan/podlators/t/data/basic.man
+++ b/cpan/podlators/t/data/basic.man
@@ -216,12 +216,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
-Dont forget \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
+Don't 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\fImethod()\fR>> and \f(CW\*(C`<$self\-\*(C'\fR{\s-1FIELDNAME\s0}>> wont end
+So things like \f(CW\*(C`<$self\-\*(C'\fR\fBmethod()\fR>> and \f(CW\*(C`<$self\-\*(C'\fR{\s-1FIELDNAME\s0}>> won't end
up doing what you might expect since the first > will still terminate
the first < seen.
.PP
diff --git a/cpan/podlators/t/data/basic.ovr b/cpan/podlators/t/data/basic.ovr
index 726a16ac81..14a116946a 100644
--- a/cpan/podlators/t/data/basic.ovr
+++ b/cpan/podlators/t/data/basic.ovr
@@ -173,12 +173,12 @@ FFOORRMMAATTTTIINNGG  CCOODDEESS
Of course I should still be able to do all this _w_i_t_h escape sequences
too: "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
- Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
+ Don't forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
And make sure that 0 works too!
Now, if I use << or >> as my delimiters, then I have to use whitespace.
- So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end
+ So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> won't end
up doing what you might expect since the first > will still terminate
the first < seen.
diff --git a/cpan/podlators/t/data/basic.pod b/cpan/podlators/t/data/basic.pod
index 3c7fd59533..3c784e6fcb 100644
--- a/cpan/podlators/t/data/basic.pod
+++ b/cpan/podlators/t/data/basic.pod
@@ -268,12 +268,12 @@ Of course I should still be able to do all this I<with> escape sequences
too: C<$self-E<gt>method()> and C<$self-E<gt>{FIELDNAME}> and
C<{FOO=E<gt>BAR}>.
-Dont forget C<$self-E<gt>method()-E<gt>{FIELDNAME} = {FOO=E<gt>BAR}>.
+Don't forget C<$self-E<gt>method()-E<gt>{FIELDNAME} = {FOO=E<gt>BAR}>.
And make sure that C<0> works too!
Now, if I use << or >> as my delimiters, then I have to use whitespace.
-So things like C<<$self->method()>> and C<<$self->{FIELDNAME}>> wont end
+So things like C<<$self->method()>> and C<<$self->{FIELDNAME}>> won't end
up doing what you might expect since the first > will still terminate
the first < seen.
diff --git a/cpan/podlators/t/data/basic.txt b/cpan/podlators/t/data/basic.txt
index 5eee3c98c1..f0f8ba216d 100644
--- a/cpan/podlators/t/data/basic.txt
+++ b/cpan/podlators/t/data/basic.txt
@@ -173,12 +173,12 @@ FORMATTING CODES
Of course I should still be able to do all this *with* escape sequences
too: "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
- Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
+ Don't forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
And make sure that 0 works too!
Now, if I use << or >> as my delimiters, then I have to use whitespace.
- So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end
+ So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> won't end
up doing what you might expect since the first > will still terminate
the first < seen.
diff --git a/cpan/podlators/t/data/snippets/man/error-stderr b/cpan/podlators/t/data/snippets/man/error-stderr
index bcaef66f39..9effc9eef9 100644
--- a/cpan/podlators/t/data/snippets/man/error-stderr
+++ b/cpan/podlators/t/data/snippets/man/error-stderr
@@ -1,5 +1,5 @@
[name]
-Errors to stadard error
+Errors to standard error
[options]
errors stderr
diff --git a/cpan/podlators/t/data/snippets/man/soft-hyphens b/cpan/podlators/t/data/snippets/man/soft-hyphens
index 48c1235768..90447679db 100644
--- a/cpan/podlators/t/data/snippets/man/soft-hyphens
+++ b/cpan/podlators/t/data/snippets/man/soft-hyphens
@@ -2,7 +2,7 @@
Soft hyphens
[input]
-=head1 Soft Hypen Testing
+=head1 Soft Hyphen Testing
sigE<shy>action
manuE<shy>script
@@ -21,8 +21,8 @@ manuE<0x00AD>script
JarkE<0x00AD>ko HieE<0x00AD>taE<0x00AD>nieE<0x00AD>mi
[output]
-.SH "Soft Hypen Testing"
-.IX Header "Soft Hypen Testing"
+.SH "Soft Hyphen Testing"
+.IX Header "Soft Hyphen Testing"
sig\%action
manu\%script
Jark\%ko Hie\%ta\%nie\%mi
diff --git a/cpan/podlators/t/docs/pod-spelling.t b/cpan/podlators/t/docs/pod-spelling.t
index 6debd42027..dc11b9cf92 100644
--- a/cpan/podlators/t/docs/pod-spelling.t
+++ b/cpan/podlators/t/docs/pod-spelling.t
@@ -3,7 +3,7 @@
# Check for spelling errors in POD documentation.
#
# The canonical version of this file is maintained in the rra-c-util package,
-# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
+# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
# Copyright 2013, 2014
diff --git a/cpan/podlators/t/docs/pod.t b/cpan/podlators/t/docs/pod.t
index 674ce30094..2ef7bf07c7 100644
--- a/cpan/podlators/t/docs/pod.t
+++ b/cpan/podlators/t/docs/pod.t
@@ -3,7 +3,7 @@
# Check all POD documents for POD formatting errors.
#
# The canonical version of this file is maintained in the rra-c-util package,
-# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
+# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
# Copyright 2012, 2013, 2014
diff --git a/cpan/podlators/t/docs/synopsis.t b/cpan/podlators/t/docs/synopsis.t
index 3cdcbab21c..384e407b7e 100644
--- a/cpan/podlators/t/docs/synopsis.t
+++ b/cpan/podlators/t/docs/synopsis.t
@@ -3,7 +3,7 @@
# Check the SYNOPSIS section of the documentation for syntax errors.
#
# The canonical version of this file is maintained in the rra-c-util package,
-# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
+# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
# Copyright 2013, 2014
diff --git a/cpan/podlators/t/lib/Test/RRA.pm b/cpan/podlators/t/lib/Test/RRA.pm
index fe95cd2781..bbdb2b0213 100644
--- a/cpan/podlators/t/lib/Test/RRA.pm
+++ b/cpan/podlators/t/lib/Test/RRA.pm
@@ -13,6 +13,7 @@ use strict;
use warnings;
use Exporter;
+use File::Temp;
use Test::More;
# For Perl 5.006 compatibility.
@@ -26,12 +27,56 @@ our (@EXPORT_OK, @ISA, $VERSION);
# consistency is good).
BEGIN {
@ISA = qw(Exporter);
- @EXPORT_OK = qw(skip_unless_author skip_unless_automated use_prereq);
+ @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 = '6.01';
+ $VERSION = '6.03';
+}
+
+# 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
+# differ.
+#
+# $got - The output that we received
+# $expected - The path to the file containing the expected output
+# $message - The message to use when reporting the test results
+#
+# Returns: undef
+# Throws: Exception on failure to read or write files or run diff
+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");
+ my $data = do { local $/ = undef; <$fh> };
+ close($fh) or BAIL_OUT("Cannot close $expected: $!\n");
+ if ($got eq $data) {
+ is($got, $data, $message);
+ return;
+ }
+
+ # Otherwise, we show a diff, but only if we have IPC::System::Simple.
+ eval { require IPC::System::Simple };
+ if ($@) {
+ ok(0, $message);
+ return;
+ }
+
+ # They're not equal. Write out what we got so that we can run diff.
+ my $tmp = File::Temp->new();
+ my $tmpname = $tmp->filename;
+ print {$tmp} $got or BAIL_OUT("Cannot write to $tmpname: $!\n");
+ my @command = ('diff', '-u', $expected, $tmpname);
+ my $diff = IPC::System::Simple::capturex([0 .. 1], @command);
+ diag($diff);
+
+ # Remove the temporary file and report failure.
+ ok(0, $message);
+ return;
}
# Skip this test unless author tests are requested. Takes a short description
@@ -225,7 +270,7 @@ SOFTWARE.
Test::More(3), Test::RRA::Automake(3), Test::RRA::Config(3)
This module is maintained in the rra-c-util package. The current version is
-available from L<http://www.eyrie.org/~eagle/software/rra-c-util/>.
+available from L<https://www.eyrie.org/~eagle/software/rra-c-util/>.
The functions to control when tests are run use environment variables defined
by the L<Lancaster
diff --git a/cpan/podlators/t/lib/Test/RRA/Config.pm b/cpan/podlators/t/lib/Test/RRA/Config.pm
index 727927d2e3..7390ffa734 100644
--- a/cpan/podlators/t/lib/Test/RRA/Config.pm
+++ b/cpan/podlators/t/lib/Test/RRA/Config.pm
@@ -34,7 +34,7 @@ BEGIN {
# 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 = '6.01';
+ $VERSION = '6.03';
}
# If C_TAP_BUILD or C_TAP_SOURCE are set in the environment, look for
@@ -214,9 +214,9 @@ perlcritic(1), Test::MinimumVersion(3), Test::RRA(3), Test::RRA::Automake(3),
Test::Strict(3)
This module is maintained in the rra-c-util package. The current version is
-available from L<http://www.eyrie.org/~eagle/software/rra-c-util/>.
+available from L<https://www.eyrie.org/~eagle/software/rra-c-util/>.
The C TAP Harness test driver and libraries for TAP-based C testing are
-available from L<http://www.eyrie.org/~eagle/software/c-tap-harness/>.
+available from L<https://www.eyrie.org/~eagle/software/c-tap-harness/>.
=cut
diff --git a/cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm b/cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm
index 202d1b8ead..c4e82bce73 100644
--- a/cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm
+++ b/cpan/podlators/t/lib/Test/RRA/ModuleVersion.pm
@@ -31,7 +31,7 @@ BEGIN {
# 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 = '6.01';
+ $VERSION = '6.03';
}
# A regular expression matching the version string for a module using the
@@ -290,6 +290,6 @@ SOFTWARE.
Test::More(3), Test::RRA::Config(3)
This module is maintained in the rra-c-util package. The current version
-is available from L<http://www.eyrie.org/~eagle/software/rra-c-util/>.
+is available from L<https://www.eyrie.org/~eagle/software/rra-c-util/>.
=cut
diff --git a/cpan/podlators/t/style/minimum-version.t b/cpan/podlators/t/style/minimum-version.t
index e4eeafd209..c7f06898b2 100644
--- a/cpan/podlators/t/style/minimum-version.t
+++ b/cpan/podlators/t/style/minimum-version.t
@@ -3,7 +3,7 @@
# Check that too-new features of Perl are not being used.
#
# The canonical version of this file is maintained in the rra-c-util package,
-# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
+# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
# Copyright 2013, 2014
diff --git a/cpan/podlators/t/style/module-version.t b/cpan/podlators/t/style/module-version.t
index 125f8a2dd3..021095ded2 100644
--- a/cpan/podlators/t/style/module-version.t
+++ b/cpan/podlators/t/style/module-version.t
@@ -144,6 +144,6 @@ SOFTWARE.
=head1 SEE ALSO
This module is maintained in the rra-c-util package. The current version
-is available from L<http://www.eyrie.org/~eagle/software/rra-c-util/>.
+is available from L<https://www.eyrie.org/~eagle/software/rra-c-util/>.
=cut
diff --git a/cpan/podlators/t/style/strict.t b/cpan/podlators/t/style/strict.t
index 7137b15226..5f667b94a1 100644
--- a/cpan/podlators/t/style/strict.t
+++ b/cpan/podlators/t/style/strict.t
@@ -3,9 +3,10 @@
# Test Perl code for strict, warnings, and syntax.
#
# The canonical version of this file is maintained in the rra-c-util package,
-# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
+# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2016 Russ Allbery <eagle@eyrie.org>
# Copyright 2013, 2014
# The Board of Trustees of the Leland Stanford Junior University
#
@@ -39,8 +40,9 @@ use Test::RRA qw(skip_unless_automated use_prereq);
# Skip for normal user installs since this doesn't affect functionality.
skip_unless_automated('Strictness tests');
-# Load prerequisite modules.
-use_prereq('Test::Strict');
+# Load prerequisite modules. At least 0.25 is needed to recognize that having
+# use 5.012 or later automatically implies use strict.
+use_prereq('Test::Strict', '0.25');
# Test everything in the distribution directory except the Build and
# Makefile.PL scripts generated by Module::Build. We also want to check use
diff --git a/cpan/podlators/t/text/options.t b/cpan/podlators/t/text/options.t
index 3338aa63c2..ab9350c7f0 100644
--- a/cpan/podlators/t/text/options.t
+++ b/cpan/podlators/t/text/options.t
@@ -71,7 +71,7 @@ while (<DATA>) {
last if $_ eq "###\n";
$expected .= $_;
}
- is ($output, $expected, "Ouput correct for test $n");
+ is ($output, $expected, "Output correct for test $n");
open (ERR, "out$$.err") or die "Cannot open out$$.err: $!\n";
my $errors;
{