summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--cpan/podlators/VERSION2
-rw-r--r--cpan/podlators/lib/Pod/Man.pm66
-rw-r--r--cpan/podlators/lib/Pod/Text.pm32
-rw-r--r--cpan/podlators/scripts/pod2man.PL32
-rw-r--r--cpan/podlators/scripts/pod2text.PL28
-rw-r--r--cpan/podlators/t/basic.t25
-rw-r--r--cpan/podlators/t/color.t12
-rw-r--r--cpan/podlators/t/filehandle.t18
-rw-r--r--cpan/podlators/t/man-heading.t8
-rw-r--r--cpan/podlators/t/man-options.t19
-rw-r--r--cpan/podlators/t/man-perlio.t13
-rw-r--r--cpan/podlators/t/man-utf8.t12
-rw-r--r--cpan/podlators/t/man.t36
-rw-r--r--cpan/podlators/t/overstrike.t12
-rw-r--r--cpan/podlators/t/pod-parser.t26
-rw-r--r--cpan/podlators/t/termcap.t12
-rw-r--r--cpan/podlators/t/text-encoding.t21
-rw-r--r--cpan/podlators/t/text-options.t19
-rw-r--r--cpan/podlators/t/text-perlio.t12
-rw-r--r--cpan/podlators/t/text-utf8.t12
-rw-r--r--cpan/podlators/t/text.t25
-rw-r--r--pod/perlpodstyle.pod97
-rw-r--r--t/porting/customized.dat6
24 files changed, 313 insertions, 234 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index d81032ac6e..b3ce2543bd 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1550,7 +1550,7 @@ use File::Glob qw(:case);
'podlators' => {
'MAINTAINER' => 'rra',
- 'DISTRIBUTION' => 'RRA/podlators-2.4.0.tar.gz',
+ 'DISTRIBUTION' => 'RRA/podlators-2.4.2.tar.gz',
'FILES' => q[cpan/podlators pod/perlpodstyle.pod],
# The perl distribution has pod2man.PL and pod2text.PL, which are
diff --git a/cpan/podlators/VERSION b/cpan/podlators/VERSION
index fd896eacc4..1bc3ad4f58 100644
--- a/cpan/podlators/VERSION
+++ b/cpan/podlators/VERSION
@@ -1 +1 @@
-$VERSION = '2.4.0';
+$VERSION = '2.4.2';
diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
index 96f3fccee7..38593719d1 100644
--- a/cpan/podlators/lib/Pod/Man.pm
+++ b/cpan/podlators/lib/Pod/Man.pm
@@ -1,7 +1,7 @@
# Pod::Man -- Convert POD data to formatted *roff input.
#
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-# 2010 Russ Allbery <rra@stanford.edu>
+# 2010, 2012 Russ Allbery <rra@stanford.edu>
# Substantial contributions by Sean Burke <sburke@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
@@ -36,7 +36,7 @@ use Pod::Simple ();
@ISA = qw(Pod::Simple);
-$VERSION = '2.25';
+$VERSION = '2.26';
# Set the debugging level. If someone has inserted a debug function into this
# class already, use that. Otherwise, use any Pod::Simple debug function
@@ -743,6 +743,8 @@ sub start_document {
DEBUG and print "Document is contentless\n";
$$self{CONTENTLESS} = 1;
return;
+ } else {
+ delete $$self{CONTENTLESS};
}
# When UTF-8 output is set, check whether our output file handle already
@@ -753,8 +755,9 @@ sub start_document {
if ($$self{utf8}) {
$$self{ENCODE} = 1;
eval {
- my @layers = PerlIO::get_layers ($$self{output_fh});
- if (grep { $_ eq 'utf8' } @layers) {
+ my @options = (output => 1, details => 1);
+ my $flag = (PerlIO::get_layers ($$self{output_fh}, @options))[-1];
+ if ($flag & PerlIO::F_UTF8 ()) {
$$self{ENCODE} = 0;
}
}
@@ -1106,11 +1109,17 @@ sub cmd_x {
}
# Links reduce to the text that we're given, wrapped in angle brackets if it's
-# a URL.
+# a URL. We need to format the "to" value of the link before comparing it to
+# the text since we may escape hyphens.
sub cmd_l {
my ($self, $attrs, $text) = @_;
if ($$attrs{type} eq 'url') {
- if (not defined($$attrs{to}) or $$attrs{to} eq $text) {
+ my $to = $$attrs{to};
+ if (defined $to) {
+ my $tag = $$self{PENDING}[-1];
+ $to = $self->format_text ($$tag[1], $to);
+ }
+ if (not defined ($to) or $to eq $text) {
return "<$text>";
} else {
return "$text <$$attrs{to}>";
@@ -1299,7 +1308,18 @@ sub parse_from_file {
# parse_from_file supports.
sub parse_from_filehandle {
my $self = shift;
- $self->parse_from_file (@_);
+ return $self->parse_from_file (@_);
+}
+
+# Pod::Simple's parse_file doesn't set output_fh. Wrap the call and do so
+# ourself unless it was already set by the caller, since our documentation has
+# always said that this should work.
+sub parse_file {
+ my ($self, $in) = @_;
+ unless (defined $$self{output_fh}) {
+ $self->output_fh (\*STDOUT);
+ }
+ return $self->SUPER::parse_file ($in);
}
##############################################################################
@@ -1321,7 +1341,7 @@ sub parse_from_filehandle {
undef, undef, undef, undef, undef, undef, undef, undef,
undef, undef, undef, undef, undef, undef, undef, undef,
- "A\\*`", "A\\*'", "A\\*^", "A\\*~", "A\\*:", "A\\*o", "\\*(AE", "C\\*,",
+ "A\\*`", "A\\*'", "A\\*^", "A\\*~", "A\\*:", "A\\*o", "\\*(Ae", "C\\*,",
"E\\*`", "E\\*'", "E\\*^", "E\\*:", "I\\*`", "I\\*'", "I\\*^", "I\\*:",
"\\*(D-", "N\\*~", "O\\*`", "O\\*'", "O\\*^", "O\\*~", "O\\*:", undef,
@@ -1382,6 +1402,8 @@ sub preamble_template {
. ds PI \(*p
. ds L" ``
. ds R" ''
+. ds C`
+. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
@@ -1392,18 +1414,26 @@ sub preamble_template {
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
-.ie \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
..
-. nr % 0
-. rr F
-.\}
-.el \{\
-. de IX
+.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
+. \}
+. \}
.\}
+.rr rF
----END OF PREAMBLE----
+#'# for cperl-mode
if ($accents) {
$preamble .= <<'----END OF PREAMBLE----'
@@ -1743,8 +1773,8 @@ mine).
=head1 COPYRIGHT AND LICENSE
-Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-Russ Allbery <rra@stanford.edu>.
+Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+2009, 2010, 2012 Russ Allbery <rra@stanford.edu>.
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 cc02820660..1a4fc129aa 100644
--- a/cpan/podlators/lib/Pod/Text.pm
+++ b/cpan/podlators/lib/Pod/Text.pm
@@ -1,6 +1,6 @@
# Pod::Text -- Convert POD data to formatted ASCII text.
#
-# Copyright 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009
+# Copyright 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009, 2012
# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
@@ -38,7 +38,7 @@ use Pod::Simple ();
# We have to export pod2text for backward compatibility.
@EXPORT = qw(pod2text);
-$VERSION = '3.15';
+$VERSION = '3.16';
##############################################################################
# Initialization
@@ -279,7 +279,13 @@ sub output_code { $_[0]->output ($_[1]) }
# Set up various things that have to be initialized on a per-document basis.
sub start_document {
- my $self = shift;
+ my ($self, $attrs) = @_;
+ if ($$attrs{contentless} && !$$self{ALWAYS_EMIT_SOMETHING}) {
+ $$self{CONTENTLESS} = 1;
+ return;
+ } else {
+ delete $$self{CONTENTLESS};
+ }
my $margin = $$self{opt_indent} + $$self{opt_margin};
# Initialize a few per-document variables.
@@ -298,8 +304,9 @@ sub start_document {
if ($$self{opt_utf8}) {
$$self{ENCODE} = 1;
eval {
- my @layers = PerlIO::get_layers ($$self{output_fh});
- if (grep { $_ eq 'utf8' } @layers) {
+ my @options = (output => 1, details => 1);
+ my $flag = (PerlIO::get_layers ($$self{output_fh}, @options))[-1];
+ if ($flag & PerlIO::F_UTF8 ()) {
$$self{ENCODE} = 0;
}
};
@@ -679,6 +686,17 @@ sub parse_from_filehandle {
$self->parse_from_file (@_);
}
+# Pod::Simple's parse_file doesn't set output_fh. Wrap the call and do so
+# ourself unless it was already set by the caller, since our documentation has
+# always said that this should work.
+sub parse_file {
+ my ($self, $in) = @_;
+ unless (defined $$self{output_fh}) {
+ $self->output_fh (\*STDOUT);
+ }
+ return $self->SUPER::parse_file ($in);
+}
+
##############################################################################
# Module return value and documentation
##############################################################################
@@ -877,8 +895,8 @@ how to use Pod::Simple.
=head1 COPYRIGHT AND LICENSE
-Copyright 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009 Russ Allbery
-<rra@stanford.edu>.
+Copyright 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009, 2012 Russ
+Allbery <rra@stanford.edu>.
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 08bdde24c8..4636601439 100644
--- a/cpan/podlators/scripts/pod2man.PL
+++ b/cpan/podlators/scripts/pod2man.PL
@@ -37,7 +37,7 @@ print OUT <<'!NO!SUBS!';
# pod2man -- Convert POD data to formatted *roff input.
#
-# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010
+# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012
# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
@@ -51,6 +51,9 @@ use Pod::Usage qw(pod2usage);
use strict;
+# Clean up $0 for error reporting.
+$0 =~ s%.*/%%;
+
# Insert -- into @ARGV before any single dash argument to hide it from
# Getopt::Long; we want to interpret it as meaning stdin.
my $stdin;
@@ -81,14 +84,25 @@ delete $options{verbose};
delete $options{lax};
# Initialize and run the formatter, pulling a pair of input and output off at
-# a time.
+# 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 $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;
+ warn "$0: unable to format $files[0]\n";
+ if (defined ($files[1]) and $files[1] ne '-') {
+ unlink $files[1] unless (-s $files[1]);
+ }
+ }
} while (@ARGV);
+exit $status;
__END__
@@ -281,10 +295,19 @@ Print out the name of each output file as it is being generated.
=back
+=head1 EXIT STATUS
+
+As long as all documents processed result in some output, even if that
+output includes errata (a C<POD ERRORS> section), B<pod2man> will exit
+with status 0. If any of the documents being processed do not result
+in an output document, B<pod2man> will exit with status 1.
+
=head1 DIAGNOSTICS
If B<pod2man> fails with errors, see L<Pod::Man> and L<Pod::Simple> for
-information about what those errors might mean.
+information about what those errors might mean. Most POD formatting
+errors will be reported in a C<POD ERRORS> section of the generated
+document.
=head1 EXAMPLES
@@ -329,7 +352,7 @@ B<pod2man> by Larry Wall and Tom Christiansen.
=head1 COPYRIGHT AND LICENSE
-Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010 Russ Allbery
+Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012 Russ Allbery
<rra@stanford.edu>.
This program is free software; you may redistribute it and/or modify it
@@ -337,7 +360,6 @@ under the same terms as Perl itself.
=cut
!NO!SUBS!
-#'# (cperl-mode)
close OUT or die "Can't close $file: $!";
chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
diff --git a/cpan/podlators/scripts/pod2text.PL b/cpan/podlators/scripts/pod2text.PL
index 62be8a4b8e..2ec28d40bf 100644
--- a/cpan/podlators/scripts/pod2text.PL
+++ b/cpan/podlators/scripts/pod2text.PL
@@ -37,7 +37,7 @@ print OUT <<'!NO!SUBS!';
# pod2text -- Convert POD data to formatted ASCII text.
#
-# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010
+# Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012
# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
@@ -54,6 +54,9 @@ use Pod::Usage qw(pod2usage);
use strict;
+# Clean up $0 for error reporting.
+$0 =~ s%.*/%%;
+
# Take an initial pass through our options, looking for one of the form
# -<number>. We turn that into -w <number> for compatibility with the
# original pod2text script.
@@ -100,10 +103,19 @@ delete @options{'color', 'termcap', 'overstrike'};
# Initialize and run the formatter.
my $parser = $formatter->new (%options);
+my $status = 0;
do {
my ($input, $output) = splice (@ARGV, 0, 2);
$parser->parse_from_file ($input, $output);
+ if ($parser->{CONTENTLESS}) {
+ $status = 1;
+ warn "$0: unable to format $input\n";
+ if (defined ($output) and $output ne '-') {
+ unlink $output unless (-s $output);
+ }
+ }
} while (@ARGV);
+exit $status;
__END__
@@ -113,7 +125,7 @@ pod2text - Convert POD data to formatted ASCII text
=for stopwords
-aclostu --alt --stderr Allbery --overstrike overstrike --termcap --utf8
-UTF-8
+UTF-8 subclasses
=head1 SYNOPSIS
@@ -240,6 +252,13 @@ your terminal device.
=back
+=head1 EXIT STATUS
+
+As long as all documents processed result in some output, even if that
+output includes errata (a C<POD ERRORS> section), B<pod2text> will exit
+with status 0. If any of the documents being processed do not result
+in an output document, B<pod2text> will exit with status 1.
+
=head1 DIAGNOSTICS
If B<pod2text> fails with errors, see L<Pod::Text> and L<Pod::Simple> for
@@ -262,6 +281,9 @@ loaded.
In addition, other L<Getopt::Long> error messages may result from invalid
command-line options.
+Most POD formatting errors will be reported in a C<POD ERRORS> section of
+the generated document.
+
=head1 ENVIRONMENT
=over 4
@@ -295,7 +317,7 @@ Russ Allbery <rra@stanford.edu>.
=head1 COPYRIGHT AND LICENSE
-Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010 Russ Allbery
+Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012 Russ Allbery
<rra@stanford.edu>.
This program is free software; you may redistribute it and/or modify it
diff --git a/cpan/podlators/t/basic.t b/cpan/podlators/t/basic.t
index eb94ef22a3..4103ed6e19 100644
--- a/cpan/podlators/t/basic.t
+++ b/cpan/podlators/t/basic.t
@@ -2,7 +2,8 @@
#
# basic.t -- Basic tests for podlators.
#
-# Copyright 2001, 2002, 2004, 2006, 2009 by Russ Allbery <rra@stanford.edu>
+# Copyright 2001, 2002, 2004, 2006, 2009, 2012
+# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -70,22 +71,22 @@ for my $module (sort keys %translators) {
# For Pod::Man, strip out the autogenerated header up to the .TH title
# line. That means that we don't check those things; oh well. The
# header changes with each version change or touch of the input file.
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
$parser->parse_from_file (source_path ('basic.pod'), \*OUT);
close OUT;
if ($module eq 'Pod::Man') {
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- open (OUTPUT, "> out.$translators{$module}")
- or die "Cannot create out.$translators{$module}: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
+ open (OUTPUT, "> out$$.$translators{$module}")
+ or die "Cannot create out$$.$translators{$module}: $!\n";
local $_;
while (<TMP>) { last if /^\.nh/ }
print OUTPUT while <TMP>;
close OUTPUT;
close TMP;
- 1 while unlink 'out.tmp';
+ 1 while unlink "out$$.tmp";
} else {
- rename ('out.tmp', "out.$translators{$module}")
- or die "Cannot rename out.tmp: $!\n";
+ rename ("out$$.tmp", "out$$.$translators{$module}")
+ or die "Cannot rename out$$.tmp: $!\n";
}
# Slurp the output and expected output and compare them.
@@ -94,8 +95,8 @@ for my $module (sort keys %translators) {
local $/;
open (MASTER, source_path ("basic.$translators{$module}"))
or die "Cannot open basic.$translators{$module}: $!\n";
- open (OUTPUT, "out.$translators{$module}")
- or die "Cannot open out.$translators{$module}: $!\n";
+ open (OUTPUT, "out$$.$translators{$module}")
+ or die "Cannot open out$$.$translators{$module}: $!\n";
$master = <MASTER>;
$output = <OUTPUT>;
close MASTER;
@@ -108,9 +109,9 @@ for my $module (sort keys %translators) {
$output =~ tr/\033/\047/;
}
if (ok ($master eq $output, "$module output is correct")) {
- 1 while unlink "out.$translators{$module}";
+ 1 while unlink "out$$.$translators{$module}";
} else {
- diag ("Non-matching output left in out.$translators{$module}\n");
+ diag ("Non-matching output left in out$$.$translators{$module}\n");
}
}
}
diff --git a/cpan/podlators/t/color.t b/cpan/podlators/t/color.t
index f6be17b7cd..826d9213f7 100644
--- a/cpan/podlators/t/color.t
+++ b/cpan/podlators/t/color.t
@@ -2,7 +2,7 @@
#
# color.t -- Additional specialized tests for Pod::Text::Color.
#
-# Copyright 2002, 2004, 2006, 2009 by Russ Allbery <rra@stanford.edu>
+# Copyright 2002, 2004, 2006, 2009, 2012 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -36,23 +36,23 @@ isa_ok ($parser, 'Pod::Text::Color', 'Parser object');
my $n = 1;
while (<DATA>) {
next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
while (<DATA>) {
last if $_ eq "###\n";
print TMP $_;
}
close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
my $output;
{
local $/;
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
diff --git a/cpan/podlators/t/filehandle.t b/cpan/podlators/t/filehandle.t
index 1ed0667b33..8c074162a2 100644
--- a/cpan/podlators/t/filehandle.t
+++ b/cpan/podlators/t/filehandle.t
@@ -2,7 +2,7 @@
#
# filehandle.t -- Test the parse_from_filehandle interface.
#
-# Copyright 2006, 2009 by Russ Allbery <rra@stanford.edu>
+# Copyright 2006, 2009, 2012 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -31,7 +31,7 @@ my $text = Pod::Text->new;
isa_ok ($text, 'Pod::Text', 'Pod::Text parser object');
while (<DATA>) {
next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp.pod: $!\n";
while (<DATA>) {
last if $_ eq "###\n";
print TMP $_;
@@ -39,12 +39,12 @@ while (<DATA>) {
close TMP;
# Test Pod::Man output.
- open (IN, '< tmp.pod') or die "Cannot open tmp.pod: $!\n";
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (IN, "< tmp$$.pod") or die "Cannot open tmp$$.pod: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
$man->parse_from_filehandle (\*IN, \*OUT);
close IN;
close OUT;
- open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (OUT, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
while (<OUT>) { last if /^\.nh/ }
my $output;
{
@@ -60,18 +60,18 @@ while (<DATA>) {
is ($output, $expected, 'Pod::Man output is correct');
# Test Pod::Text output.
- open (IN, '< tmp.pod') or die "Cannot open tmp.pod: $!\n";
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (IN, "< tmp$$.pod") or die "Cannot open tmp$$.pod: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
$text->parse_from_filehandle (\*IN, \*OUT);
close IN;
close OUT;
- open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (OUT, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
{
local $/;
$output = <OUT>;
}
close OUT;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
$expected = '';
while (<DATA>) {
last if $_ eq "###\n";
diff --git a/cpan/podlators/t/man-heading.t b/cpan/podlators/t/man-heading.t
index f7e470e3c0..fa4792c3cb 100644
--- a/cpan/podlators/t/man-heading.t
+++ b/cpan/podlators/t/man-heading.t
@@ -2,7 +2,7 @@
#
# man-options.t -- Additional tests for Pod::Man options.
#
-# Copyright 2002, 2004, 2006, 2008, 2009 Russ Allbery <rra@stanford.edu>
+# Copyright 2002, 2004, 2006, 2008, 2009, 2012 Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -36,10 +36,10 @@ while (<DATA>) {
close TMP;
my $parser = Pod::Man->new (%options);
isa_ok ($parser, 'Pod::Man', 'Parser object');
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
$parser->parse_from_file ('tmp.pod', \*OUT);
close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
my $heading;
while (<TMP>) {
if (/^\.TH/) {
@@ -48,7 +48,7 @@ while (<DATA>) {
}
}
close TMP;
- unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ('tmp.pod', "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
diff --git a/cpan/podlators/t/man-options.t b/cpan/podlators/t/man-options.t
index 0cc09fae2b..6b4def7b01 100644
--- a/cpan/podlators/t/man-options.t
+++ b/cpan/podlators/t/man-options.t
@@ -2,7 +2,7 @@
#
# man-options.t -- Additional tests for Pod::Man options.
#
-# Copyright 2002, 2004, 2006, 2008, 2009 Russ Allbery <rra@stanford.edu>
+# Copyright 2002, 2004, 2006, 2008, 2009, 2012 Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -24,7 +24,7 @@ BEGIN { use_ok ('Pod::Man') }
# Redirect stderr to a file.
sub stderr_save {
open (OLDERR, '>&STDERR') or die "Can't dup STDERR: $!\n";
- open (STDERR, '> out.err') or die "Can't redirect STDERR: $!\n";
+ open (STDERR, "> out$$.err") or die "Can't redirect STDERR: $!\n";
}
# Restore stderr.
@@ -43,7 +43,7 @@ while (<DATA>) {
my ($option, $value) = split;
$options{$option} = $value;
}
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
while (<DATA>) {
last if $_ eq "###\n";
print TMP $_;
@@ -51,13 +51,13 @@ while (<DATA>) {
close TMP;
my $parser = Pod::Man->new (%options);
isa_ok ($parser, 'Pod::Man', 'Parser object');
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
stderr_save;
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
stderr_restore;
close OUT;
my $accents = 0;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
while (<TMP>) {
last if /^\.nh/;
}
@@ -67,21 +67,22 @@ while (<DATA>) {
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
$expected .= $_;
}
is ($output, $expected, "Output correct for test $n");
- open (ERR, 'out.err') or die "Cannot open out.err: $!\n";
+ open (ERR, "out$$.err") or die "Cannot open out.err: $!\n";
my $errors;
{
local $/;
$errors = <ERR>;
}
close ERR;
- 1 while unlink ('out.err');
+ $errors =~ s/\Qtmp$$.pod/tmp.pod/g;
+ 1 while unlink ("out$$.err");
$expected = '';
while (<DATA>) {
last if $_ eq "###\n";
diff --git a/cpan/podlators/t/man-perlio.t b/cpan/podlators/t/man-perlio.t
index 04450c2bd6..e6aad3aeeb 100644
--- a/cpan/podlators/t/man-perlio.t
+++ b/cpan/podlators/t/man-perlio.t
@@ -2,7 +2,8 @@
#
# man-perlio.t -- Test Pod::Man with a PerlIO UTF-8 encoding layer.
#
-# Copyright 2002, 2004, 2006, 2008, 2009, 2010 Russ Allbery <rra@stanford.edu>
+# Copyright 2002, 2004, 2006, 2008, 2009, 2010, 2012
+# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -47,7 +48,7 @@ while (<DATA>) {
my ($option, $value) = split;
$options{$option} = $value;
}
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
eval { binmode (\*TMP, ':encoding(utf-8)') };
print TMP "=encoding utf-8\n\n";
while (<DATA>) {
@@ -57,12 +58,12 @@ while (<DATA>) {
close TMP;
my $parser = Pod::Man->new (%options);
isa_ok ($parser, 'Pod::Man', 'Parser object');
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
eval { binmode (\*OUT, ':encoding(utf-8)') };
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
my $accents = 0;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
eval { binmode (\*TMP, ':encoding(utf-8)') };
while (<TMP>) {
$accents = 1 if /Accent mark definitions/;
@@ -74,7 +75,7 @@ while (<DATA>) {
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
if ($options{utf8}) {
ok (!$accents, "Saw no accent definitions for test $n");
} else {
diff --git a/cpan/podlators/t/man-utf8.t b/cpan/podlators/t/man-utf8.t
index 6c03fbef37..c0d9ba859d 100644
--- a/cpan/podlators/t/man-utf8.t
+++ b/cpan/podlators/t/man-utf8.t
@@ -2,7 +2,7 @@
#
# man-utf8.t -- Test Pod::Man with UTF-8 input.
#
-# Copyright 2002, 2004, 2006, 2008, 2009 Russ Allbery <rra@stanford.edu>
+# Copyright 2002, 2004, 2006, 2008, 2009, 2012 Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -47,7 +47,7 @@ while (<DATA>) {
my ($option, $value) = split;
$options{$option} = $value;
}
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
eval { binmode (\*TMP, ':encoding(utf-8)') };
print TMP "=encoding utf-8\n\n";
while (<DATA>) {
@@ -57,11 +57,11 @@ while (<DATA>) {
close TMP;
my $parser = Pod::Man->new (%options);
isa_ok ($parser, 'Pod::Man', 'Parser object');
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
my $accents = 0;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
eval { binmode (\*TMP, ':encoding(utf-8)') };
while (<TMP>) {
$accents = 1 if /Accent mark definitions/;
@@ -73,7 +73,7 @@ while (<DATA>) {
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
if ($options{utf8}) {
ok (!$accents, "Saw no accent definitions for test $n");
} else {
diff --git a/cpan/podlators/t/man.t b/cpan/podlators/t/man.t
index a6b96a21e1..3a07e80c81 100644
--- a/cpan/podlators/t/man.t
+++ b/cpan/podlators/t/man.t
@@ -2,7 +2,7 @@
#
# man.t -- Additional specialized tests for Pod::Man.
#
-# Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010
+# Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2012
# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
@@ -19,7 +19,7 @@ BEGIN {
use strict;
-use Test::More tests => 31;
+use Test::More tests => 33;
BEGIN { use_ok ('Pod::Man') }
# Test whether we can use binmode to set encoding.
@@ -30,7 +30,7 @@ isa_ok ($parser, 'Pod::Man', 'Parser object');
my $n = 1;
while (<DATA>) {
next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
# We have a test in ISO 8859-1 encoding. Make sure that nothing strange
# happens if Perl thinks the world is Unicode. Wrap this in eval so that
@@ -42,10 +42,10 @@ while (<DATA>) {
print TMP $_;
}
close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
- open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (OUT, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
while (<OUT>) { last if /^\.nh/ }
my $output;
{
@@ -53,7 +53,7 @@ while (<DATA>) {
$output = <OUT>;
}
close OUT;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
@@ -528,3 +528,25 @@ world\ \ \
.PP
\&.
###
+
+###
+=head1 URL LINK
+
+The newest version of this document is also available on the World Wide Web at
+L<http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod>.
+###
+.SH "URL LINK"
+.IX Header "URL LINK"
+The newest version of this document is also available on the World Wide Web at
+<http://pod.tst.eu/http://cvs.schmorp.de/rxvt\-unicode/doc/rxvt.7.pod>.
+###
+
+###
+=head1 RT LINK
+
+L<[perl #12345]|https://rt.cpan.org/12345>
+###
+.SH "RT LINK"
+.IX Header "RT LINK"
+[perl #12345] <https://rt.cpan.org/12345>
+###
diff --git a/cpan/podlators/t/overstrike.t b/cpan/podlators/t/overstrike.t
index bbfa0db9fb..1eff29d591 100644
--- a/cpan/podlators/t/overstrike.t
+++ b/cpan/podlators/t/overstrike.t
@@ -2,7 +2,7 @@
#
# overstrike.t -- Additional specialized tests for Pod::Text::Overstrike.
#
-# Copyright 2002, 2004, 2006, 2009 by Russ Allbery <rra@stanford.edu>
+# Copyright 2002, 2004, 2006, 2009, 2012 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -26,23 +26,23 @@ isa_ok ($parser, 'Pod::Text::Overstrike', 'Parser module');
my $n = 1;
while (<DATA>) {
next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
while (<DATA>) {
last if $_ eq "###\n";
print TMP $_;
}
close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
my $output;
{
local $/;
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
diff --git a/cpan/podlators/t/pod-parser.t b/cpan/podlators/t/pod-parser.t
index ae2ef01676..6394731e14 100644
--- a/cpan/podlators/t/pod-parser.t
+++ b/cpan/podlators/t/pod-parser.t
@@ -2,7 +2,7 @@
#
# pod-parser.t -- Tests for backward compatibility with Pod::Parser.
#
-# Copyright 2006, 2008, 2009 by Russ Allbery <rra@stanford.edu>
+# Copyright 2006, 2008, 2009, 2012 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -26,13 +26,13 @@ BEGIN {
my $parser = Pod::Man->new;
isa_ok ($parser, 'Pod::Man', 'Pod::Man parser object');
-open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
print TMP "Some random B<text>.\n";
close TMP;
-open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
-$parser->parse_from_file ({ -cutting => 0 }, 'tmp.pod', \*OUT);
+open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+$parser->parse_from_file ({ -cutting => 0 }, "tmp$$.pod", \*OUT);
close OUT;
-open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+open (OUT, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
while (<OUT>) { last if /^\.nh/ }
my $output;
{
@@ -44,10 +44,10 @@ is ($output, "Some random \\fBtext\\fR.\n", 'Pod::Man -cutting output');
$parser = Pod::Text->new;
isa_ok ($parser, 'Pod::Text', 'Pod::Text parser object');
-open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
-$parser->parse_from_file ({ -cutting => 0 }, 'tmp.pod', \*OUT);
+open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+$parser->parse_from_file ({ -cutting => 0 }, "tmp$$.pod", \*OUT);
close OUT;
-open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+open (OUT, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
{
local $/;
$output = <OUT>;
@@ -56,17 +56,17 @@ close OUT;
is ($output, " Some random text.\n\n", 'Pod::Text -cutting output');
# Test the pod2text function, particularly with only one argument.
-open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
print TMP "=pod\n\nSome random B<text>.\n";
close TMP;
-open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
open (SAVE, '>&STDOUT') or die "Cannot dup stdout: $!\n";
open (STDOUT, '>&OUT') or die "Cannot replace stdout: $!\n";
-pod2text ('tmp.pod');
+pod2text ("tmp$$.pod");
close OUT;
open (STDOUT, '>&SAVE') or die "Cannot fix stdout: $!\n";
close SAVE;
-open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+open (OUT, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
{
local $/;
$output = <OUT>;
@@ -74,5 +74,5 @@ open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
close OUT;
is ($output, " Some random text.\n\n", 'Pod::Text pod2text function');
-1 while unlink ('tmp.pod', 'out.tmp');
+1 while unlink ("tmp$$.pod", "out$$.tmp");
exit 0;
diff --git a/cpan/podlators/t/termcap.t b/cpan/podlators/t/termcap.t
index c75cb44bb4..808c2f3212 100644
--- a/cpan/podlators/t/termcap.t
+++ b/cpan/podlators/t/termcap.t
@@ -2,7 +2,7 @@
#
# termcap.t -- Additional specialized tests for Pod::Text::Termcap.
#
-# Copyright 2002, 2004, 2006, 2009 by Russ Allbery <rra@stanford.edu>
+# Copyright 2002, 2004, 2006, 2009, 2012 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -31,23 +31,23 @@ isa_ok ($parser, 'Pod::Text::Termcap', 'Parser module');
my $n = 1;
while (<DATA>) {
next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
while (<DATA>) {
last if $_ eq "###\n";
print TMP $_;
}
close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
my $output;
{
local $/;
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
diff --git a/cpan/podlators/t/text-encoding.t b/cpan/podlators/t/text-encoding.t
index 14181e80dd..d096b37b05 100644
--- a/cpan/podlators/t/text-encoding.t
+++ b/cpan/podlators/t/text-encoding.t
@@ -2,7 +2,7 @@
#
# text-encoding.t -- Test Pod::Text with various weird encoding combinations.
#
-# Copyright 2002, 2004, 2006, 2007, 2008, 2009
+# Copyright 2002, 2004, 2006, 2007, 2008, 2009, 2012
# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
@@ -26,7 +26,7 @@ BEGIN {
if ($] < 5.008) {
plan skip_all => 'Perl 5.8 required for encoding support';
} else {
- plan tests => 7;
+ plan tests => 5;
}
}
BEGIN { use_ok ('Pod::Text') }
@@ -40,22 +40,21 @@ eval { binmode ($builder->failure_output, ':raw') };
my $n = 1;
while (<DATA>) {
my %opts;
- $opts{utf8} = 1 if $n == 3;
next until $_ eq "###\n";
my $parser = Pod::Text->new (%opts);
isa_ok ($parser, 'Pod::Text', 'Parser object');
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
eval { binmode (\*TMP, ':raw') };
while (<DATA>) {
last if $_ eq "###\n";
print TMP $_;
}
close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
eval { binmode (\*OUT, ':raw') };
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
eval { binmode (\*TMP, ':raw') };
my $output;
{
@@ -63,7 +62,7 @@ while (<DATA>) {
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
@@ -128,9 +127,3 @@ I can eat glass
See <http://www.columbia.edu/kermit/utf8.html>
###
-
-###
-=head1 Beyoncé
-###
-Beyoncé
-###
diff --git a/cpan/podlators/t/text-options.t b/cpan/podlators/t/text-options.t
index 7b70980785..e49b746b18 100644
--- a/cpan/podlators/t/text-options.t
+++ b/cpan/podlators/t/text-options.t
@@ -2,7 +2,7 @@
#
# text-options.t -- Additional tests for Pod::Text options.
#
-# Copyright 2002, 2004, 2006, 2008, 2009 by Russ Allbery <rra@stanford.edu>
+# Copyright 2002, 2004, 2006, 2008, 2009, 2012 Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -24,7 +24,7 @@ BEGIN { use_ok ('Pod::Text') }
# Redirect stderr to a file.
sub stderr_save {
open (OLDERR, '>&STDERR') or die "Can't dup STDERR: $!\n";
- open (STDERR, '> out.err') or die "Can't redirect STDERR: $!\n";
+ open (STDERR, "> out$$.err") or die "Can't redirect STDERR: $!\n";
}
# Restore stderr.
@@ -43,7 +43,7 @@ while (<DATA>) {
my ($option, $value) = split;
$options{$option} = $value;
}
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
while (<DATA>) {
last if $_ eq "###\n";
print TMP $_;
@@ -51,33 +51,34 @@ while (<DATA>) {
close TMP;
my $parser = Pod::Text->new (%options);
isa_ok ($parser, 'Pod::Text', 'Parser object');
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
stderr_save;
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
stderr_restore;
close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
my $output;
{
local $/;
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
$expected .= $_;
}
is ($output, $expected, "Ouput correct for test $n");
- open (ERR, 'out.err') or die "Cannot open out.err: $!\n";
+ open (ERR, "out$$.err") or die "Cannot open out$$.err: $!\n";
my $errors;
{
local $/;
$errors = <ERR>;
}
close ERR;
- 1 while unlink ('out.err');
+ $errors =~ s/\Qtmp$$.pod/tmp.pod/g;
+ 1 while unlink ("out$$.err");
$expected = '';
while (<DATA>) {
last if $_ eq "###\n";
diff --git a/cpan/podlators/t/text-perlio.t b/cpan/podlators/t/text-perlio.t
index c9599bddda..fe50ca1856 100644
--- a/cpan/podlators/t/text-perlio.t
+++ b/cpan/podlators/t/text-perlio.t
@@ -2,7 +2,7 @@
#
# text-perlio.t -- Test Pod::Text with a PerlIO UTF-8 encoding layer.
#
-# Copyright 2002, 2004, 2006, 2007, 2008, 2009, 2010
+# Copyright 2002, 2004, 2006, 2007, 2008, 2009, 2010, 2012
# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
@@ -41,7 +41,7 @@ eval { binmode ($builder->output, ':encoding(utf-8)') };
eval { binmode ($builder->failure_output, ':encoding(utf-8)') };
while (<DATA>) {
next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
eval { binmode (\*TMP, ':encoding(utf-8)') };
print TMP "=encoding UTF-8\n\n";
while (<DATA>) {
@@ -49,11 +49,11 @@ while (<DATA>) {
print TMP $_;
}
close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
eval { binmode (\*OUT, ':encoding(utf-8)') };
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
eval { binmode (\*TMP, ':encoding(utf-8)') };
my $output;
{
@@ -61,7 +61,7 @@ while (<DATA>) {
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
diff --git a/cpan/podlators/t/text-utf8.t b/cpan/podlators/t/text-utf8.t
index 4874de5021..822f1ea31f 100644
--- a/cpan/podlators/t/text-utf8.t
+++ b/cpan/podlators/t/text-utf8.t
@@ -2,7 +2,7 @@
#
# text-utf8.t -- Test Pod::Text with UTF-8 input.
#
-# Copyright 2002, 2004, 2006, 2007, 2008, 2009
+# Copyright 2002, 2004, 2006, 2007, 2008, 2009, 2012
# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
@@ -41,7 +41,7 @@ eval { binmode ($builder->output, ':encoding(utf-8)') };
eval { binmode ($builder->failure_output, ':encoding(utf-8)') };
while (<DATA>) {
next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
eval { binmode (\*TMP, ':encoding(utf-8)') };
print TMP "=encoding UTF-8\n\n";
while (<DATA>) {
@@ -49,10 +49,10 @@ while (<DATA>) {
print TMP $_;
}
close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
eval { binmode (\*TMP, ':encoding(utf-8)') };
my $output;
{
@@ -60,7 +60,7 @@ while (<DATA>) {
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
diff --git a/cpan/podlators/t/text.t b/cpan/podlators/t/text.t
index 5b7f4384f7..223e0b0d90 100644
--- a/cpan/podlators/t/text.t
+++ b/cpan/podlators/t/text.t
@@ -2,7 +2,8 @@
#
# text.t -- Additional specialized tests for Pod::Text.
#
-# Copyright 2002, 2004, 2006, 2007, 2008, 2009 Russ Allbery <rra@stanford.edu>
+# Copyright 2002, 2004, 2006, 2007, 2008, 2009, 2012
+# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -19,7 +20,7 @@ BEGIN {
use strict;
use Pod::Simple;
-use Test::More tests => 8;
+use Test::More tests => 9;
BEGIN { use_ok ('Pod::Text') }
my $parser = Pod::Text->new;
@@ -27,23 +28,23 @@ isa_ok ($parser, 'Pod::Text', 'Parser object');
my $n = 1;
while (<DATA>) {
next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+ open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
while (<DATA>) {
last if $_ eq "###\n";
print TMP $_;
}
close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+ $parser->parse_from_file ("tmp$$.pod", \*OUT);
close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
my $output;
{
local $/;
$output = <TMP>;
}
close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
+ 1 while unlink ("tmp$$.pod", "out$$.tmp");
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
@@ -142,3 +143,13 @@ LINK TO URL
This is a link <http://www.example.com/> to a URL.
###
+
+###
+=head1 RT LINK
+
+L<[perl #12345]|https://rt.cpan.org/12345>
+###
+RT LINK
+ [perl #12345] <https://rt.cpan.org/12345>
+
+###
diff --git a/pod/perlpodstyle.pod b/pod/perlpodstyle.pod
index 850f38dc8d..6c4cfa04af 100644
--- a/pod/perlpodstyle.pod
+++ b/pod/perlpodstyle.pod
@@ -5,70 +5,37 @@ perlpodstyle - Perl POD style guide
=head1 DESCRIPTION
These are general guidelines for how to write POD documentation for Perl
-scripts and modules, based on general guidelines for writing good Unix man
+scripts and modules, based on general guidelines for writing good UNIX man
pages. All of these guidelines are, of course, optional, but following
them will make your documentation more consistent with other documentation
on the system.
-Here are some simple guidelines for markup; see L<perlpod> for details.
-
-=over
-
-=item bold (BE<lt>E<gt>)
-
-B<NOTE: Use extremely rarely.> Do I<not> use bold for emphasis; that's
-what italics are for. Restrict bold for notices like B<NOTE:> and
-B<WARNING:>. However, program arguments and options--but I<not> their
-names!--are written in bold (using BE<lt>E<gt>) to distinguish the B<-f>
-command-line option from the C<-f> filetest operator.
-
-=item italic (IE<lt>E<gt>)
-
-Use italic to emphasize text, like I<this>. Function names are
+The name of the program being documented is conventionally written in bold
+(using BE<lt>E<gt>) wherever it occurs, as are all program options.
+Arguments should be written in italics (IE<lt>E<gt>). Function names are
traditionally written in italics; if you write a function as function(),
-Pod::Man will take care of this for you. Names of programs, including the
-name of the program being documented, are conventionally written in italics
-(using IE<lt>E<gt>) wherever they occur in normal roman text.
-
-=item code (CE<lt>E<gt>)
-
-Literal code should be in CE<lt>E<gt>. However metasyntactic placeholders
-should furthermore be nested in "italics" (actually, oblique) like
-CE<lt>IE<lt>E<gt>E<gt>. That way
-CE<lt>accept(IE<lt>NEWSOCKETE<gt>, E<lt>GENERICSOCKETE<gt>)E<gt>
-renders as C<accept(I<NEWSOCKET>, I<GENERICSOCKET>)>.
-
-=item files (FE<lt>E<gt>)
-
-Filenames, whether absolute or relative, are specified with the FE<lt>E<gt>
-markup. This will render as italics, but has other semantic connotations.
-
-=back
-
-References to other man pages should be in the form "manpage(section)" or
-"C<LE<lt>manpage(section)E<gt>>", and Pod::Man will automatically format
-those appropriately. Both will render as I<manpage>(section). The second
-form, with LE<lt>E<gt>, is used to request that a POD formatter make a link
-to the man page if possible. As an exception, one normally omits the
-section when referring to module documentation because not all systems
-place it in section 3, although that is the default. You may use
-C<LE<lt>Module::NameE<gt>> for module references instead, but this is
-optional because the translators are supposed to recognize module
-references in pod, just as they do variable references like $foo and such.
+Pod::Man will take care of this for you. Literal code or commands should
+be in CE<lt>E<gt>. References to other man pages should be in the form
+C<manpage(section)> or C<LE<lt>manpage(section)E<gt>>, and Pod::Man will
+automatically format those appropriately. The second form, with
+LE<lt>E<gt>, is used to request that a POD formatter make a link to the
+man page if possible. As an exception, one normally omits the section
+when referring to module documentation since it's not clear what section
+module documentation will be in; use C<LE<lt>Module::NameE<gt>> for module
+references instead.
References to other programs or functions are normally in the form of man
page references so that cross-referencing tools can provide the user with
links and the like. It's possible to overdo this, though, so be careful not
to clutter your documentation with too much markup. References to other
programs that are not given as man page references should be enclosed in
-italics via IE<lt>E<gt>.
+BE<lt>E<gt>.
-Major headers should be set out using a C<=head1> directive, and are
-historically written in the rather startling ALL UPPER CASE format; this is
-not mandatory, but it's strongly recommended so that sections have
-consistent naming across different software packages. The translators are
-supposed to translate all caps into small caps. Minor headers may be
-included using C<=head2>, and are typically in mixed case.
+The major headers should be set out using a C<=head1> directive, and are
+historically written in the rather startling ALL UPPER CASE format; this
+is not mandatory, but it's strongly recommended so that sections have
+consistent naming across different software packages. Minor headers may
+be included using C<=head2>, and are typically in mixed case.
The standard sections of a manual page are:
@@ -87,7 +54,7 @@ function documented by this POD page should be listed, separated by a
comma and a space. For a Perl module, just give the module name. A
single dash, and only a single dash, should separate the list of programs
or functions from the description. Do not use any markup such as
-CE<lt>E<gt> or IE<lt>E<gt> anywhere in this line. Functions should not be
+CE<lt>E<gt> or BE<lt>E<gt> anywhere in this line. Functions should not be
qualified with C<()> or the like. The description should ideally fit on a
single line, even if a man program replaces the dash with a few tabs.
@@ -229,7 +196,7 @@ Miscellaneous commentary.
=item AUTHOR
Who wrote it (use AUTHORS for multiple people). It's a good idea to
-include your current email address (or some email address to which bug
+include your current e-mail address (or some e-mail address to which bug
reports should be sent) or some other contact information so that users
have a way of contacting you. Remember that program documentation tends
to roam the wild for far longer than you expect and pick a contact method
@@ -294,22 +261,12 @@ handlers. These headings are primarily useful when documenting parts of a
C library.
Finally, as a general note, try not to use an excessive amount of markup.
-As documented here and in L<Pod::Man>, you can safely leave Perl variables,
-module names, function names, man page references, and the like unadorned
-by markup, and the POD translators will figure it all out for you. This
-makes it much easier to later edit the documentation. Note that many
-existing translators will do the wrong thing with email addresses when
-wrapped in LE<lt>E<gt>, so don't do that.
-
-You can check whether your documentation looks right by running
-
- % pod2text -o something.pod | less
-
-If you have I<groff> installed, you can get an even better look this way:
-
- % pod2man something.pod | groff -Tps -mandoc > something.ps
-
-Now view the resulting Postscript file to see whether everything checks out.
+As documented here and in L<Pod::Man>, you can safely leave Perl
+variables, function names, man page references, and the like unadorned by
+markup and the POD translators will figure it out for you. This makes it
+much easier to later edit the documentation. Note that many existing
+translators will do the wrong thing with e-mail addresses when wrapped in
+LE<lt>E<gt>, so don't do that.
=head1 SEE ALSO
diff --git a/t/porting/customized.dat b/t/porting/customized.dat
index 4b705cf66d..295daaad71 100644
--- a/t/porting/customized.dat
+++ b/t/porting/customized.dat
@@ -4,9 +4,9 @@ Test::Harness cpan/Test-Harness/t/testargs.t 79c91b2ea73f7cbfb9bae45dec4a62db74c
Module::Pluggable cpan/Module-Pluggable/Makefile.PL 72062c1a01ed7c62d16c55122c163b2d89f0d739
autodie cpan/autodie/t/open.t cb493da4305f591ca0344d09e8a840a3147c5579
libnet cpan/libnet/Makefile.PL 5554b71464b45f5cc002e55f2464f7ff4abd05b6
-podlators cpan/podlators/scripts/pod2man.PL 8fb484dc560adb00889f504760ca0a4defa9dc40
-podlators cpan/podlators/scripts/pod2text.PL 53ccba9264368c3f9acd2a36d1d354797d2a88f6
-podlators pod/perlpodstyle.pod 4f1ba65eddc5576267954b948556e16a9686c411
+podlators cpan/podlators/scripts/pod2man.PL 1a795b8dde27bbf2181f7e601c2a4cc2f1487125
+podlators cpan/podlators/scripts/pod2text.PL beb05aafd66ce0ffd2b2ce935f5db95d2eec7ff8
+podlators pod/perlpodstyle.pod 41c1019f3b1e646561b203e651101d41e9e5c0aa
CPANPLUS cpan/CPANPLUS/Makefile.PL 5d533f6722af6aae73204755beb8d6c008fc0d4a
Text-Tabs+Wrap cpan/Text-Tabs/t/fill.t a960d2c4f66b7e30557b5479e0da2da1bf7a7f45
Text-Tabs+Wrap cpan/Text-Tabs/t/tabs.t 63a67b3a319c858d7e66306b8a653de1951153dc