[perl/f17] Override the Pod::Simple::parse_file to set output to STDOUT by default
Petr Pisar
ppisar at fedoraproject.org
Fri Sep 14 11:55:57 UTC 2012
commit f60298699d1f8602924043cce2179a5e331c6b89
Author: Petr Písař <ppisar at redhat.com>
Date: Fri Sep 14 13:25:03 2012 +0200
Override the Pod::Simple::parse_file to set output to STDOUT by default
...5.14.2-Override-the-Pod-Simple-parse_file.patch | 60 ++++++++++++++++++++
perl.spec | 12 ++++-
2 files changed, 71 insertions(+), 1 deletions(-)
---
diff --git a/perl-5.14.2-Override-the-Pod-Simple-parse_file.patch b/perl-5.14.2-Override-the-Pod-Simple-parse_file.patch
new file mode 100644
index 0000000..8448220
--- /dev/null
+++ b/perl-5.14.2-Override-the-Pod-Simple-parse_file.patch
@@ -0,0 +1,60 @@
+From 915ceb2f33469eeffd28cfb81ca52a05e1301f15 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Fri, 14 Sep 2012 13:17:29 +0200
+Subject: [PATCH] Override the Pod::Simple::parse_file
+
+This sets output_fh to STDOUT if it's not already set.
+This resolves CPANRT#77530 and RHBZ#826872 and is fixed in podlators-2.4.1.
+Ported to perl-5.14.2.
+---
+ cpan/podlators/lib/Pod/Man.pm | 11 +++++++++++
+ cpan/podlators/lib/Pod/Text.pm | 11 +++++++++++
+ 2 files changed, 22 insertions(+)
+
+diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
+index 96f3fcc..ad5e5ac 100644
+--- a/cpan/podlators/lib/Pod/Man.pm
++++ b/cpan/podlators/lib/Pod/Man.pm
+@@ -1302,6 +1302,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);
++}
++
+ ##############################################################################
+ # Translation tables
+ ##############################################################################
+diff --git a/cpan/podlators/lib/Pod/Text.pm b/cpan/podlators/lib/Pod/Text.pm
+index cc02820..1a8b0bf 100644
+--- a/cpan/podlators/lib/Pod/Text.pm
++++ b/cpan/podlators/lib/Pod/Text.pm
+@@ -679,6 +679,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
+ ##############################################################################
+--
+1.7.11.4
+
diff --git a/perl.spec b/perl.spec
index dae9f23..9443a9d 100644
--- a/perl.spec
+++ b/perl.spec
@@ -24,7 +24,7 @@
Name: perl
Version: %{perl_version}
# release number must be even higher, because dual-lived modules will be broken otherwise
-Release: 214%{?dist}
+Release: 215%{?dist}
Epoch: %{perl_epoch}
Summary: Practical Extraction and Report Language
Group: Development/Languages
@@ -110,6 +110,10 @@ Patch19: perl-5.14.2-PATCH-perl-101710-Regression-with-i-latin1-chars.pat
# Free hash entries before values on delete, rhbz#771303, RT#100340
Patch20: perl-5.14.2-perl-100340-Free-hash-entries-before-values-on-delet.patch
+# Override the Pod::Simple::parse_file, rhbz#826872, CPANRT#77530, in
+# podlators-2.4.1
+Patch21: perl-5.14.2-Override-the-Pod-Simple-parse_file.patch
+
# Update some of the bundled modules
# see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
@@ -1281,6 +1285,7 @@ tarball from perl.org.
%patch18 -p1
%patch19 -p1
%patch20 -p1
+%patch21 -p1
#copy the example script
cp -a %{SOURCE5} .
@@ -1491,6 +1496,7 @@ pushd %{build_archlib}/CORE/
'Fedora Patch18: Do not truncate syscall() return value to 32 bits (RT#113980)' \
'Fedora Patch19: Match starting byte in non-UTF-8 mode (RT#101710)' \
'Fedora Patch20: Free hash entries before values on delete (RT#100340)' \
+ 'Fedora Patch21: Override the Pod::Simple::parse_file (CPANRT#77530)' \
%{nil}
rm patchlevel.bak
@@ -2442,6 +2448,10 @@ sed \
# Old changelog entries are preserved in CVS.
%changelog
+* Fri Sep 14 2012 Petr Pisar <ppisar at redhat.com> - 4:5.14.2-215
+- Override the Pod::Simple::parse_file to set output to STDOUT by default
+ (bug #826872)
+
* Tue Sep 11 2012 Petr Pisar <ppisar at redhat.com> - 4:5.14.2-214
- Clear $@ before `do' I/O error (bug #834226)
- Do not truncate syscall() return value to 32 bits (bug #838551)
More information about the scm-commits
mailing list