commit 62efa2d83869967180720a7212db0f0d00d23c95
Author: Iain Arnell <iarn...@gmail.com>
Date:   Sat Nov 5 08:22:40 2011 +0100

    apply patch to fix rt#69084

 perl-IO-Prompt-rt69084.patch |   33 +++++++++++++++++++++++++++++++++
 perl-IO-Prompt.spec          |    6 ++++++
 2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/perl-IO-Prompt-rt69084.patch b/perl-IO-Prompt-rt69084.patch
new file mode 100644
index 0000000..3ab3c37
--- /dev/null
+++ b/perl-IO-Prompt-rt69084.patch
@@ -0,0 +1,33 @@
+From 8300962b0235803287777f78b86aa1776d369769 Mon Sep 17 00:00:00 2001
+From: "Fuji, Goro" <gf...@cpan.org>
+Date: Sat, 25 Jun 2011 11:16:10 +0900
+Subject: [PATCH] Use Scalar::Util::openhandle() instead of $io->opend
+
+---
+ lib/IO/Prompt.pm |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/lib/IO/Prompt.pm b/lib/IO/Prompt.pm
+index 343d204..e0db947 100644
+--- a/lib/IO/Prompt.pm
++++ b/lib/IO/Prompt.pm
+@@ -11,6 +11,7 @@ no warnings 'utf8';
+ our @EXPORT    = qw( prompt );
+ our @EXPORT_OK = qw( hand_print get_input );
+ 
++use Scalar::Util;
+ use IO::Handle;
+ use Term::ReadKey;
+ use POSIX qw( isprint );
+@@ -185,7 +186,7 @@ sub prompt {
+     else {
+         no strict 'refs';
+         my $ARGV = $caller . "::ARGV";
+-        unless (*$ARGV->opened) {
++        unless (Scalar::Util::openhandle(*$ARGV)) {
+             $$ARGV = shift(@$ARGV) || '-';
+             open $ARGV or croak "Can't open $$ARGV: $!";
+         }
+-- 
+1.7.5.4
+
diff --git a/perl-IO-Prompt.spec b/perl-IO-Prompt.spec
index 05c036e..198337f 100644
--- a/perl-IO-Prompt.spec
+++ b/perl-IO-Prompt.spec
@@ -6,6 +6,10 @@ Release:        1%{?dist}
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 Source0:        
http://search.cpan.org/CPAN/authors/id/D/DC/DCONWAY/IO-Prompt-%{cpanver}.tar.gz 
+# doesn't work on 5.14 if you call prompt() in non-"main" package
+# see https://rt.cpan.org/Public/Bug/Display.html?id=69084
+# and 
https://github.com/gfx/p5-IO-Prompt-patched/commit/8300962b0235803287777f78b86aa1776d369769.patch
+Patch0:         perl-IO-Prompt-rt69084.patch
 URL:            http://search.cpan.org/dist/IO-Prompt
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo 
$version))
@@ -36,6 +40,7 @@ prompted.
 
 %prep
 %setup -q -n IO-Prompt-%{cpanver}
+%patch0 -p1
 
 find . -type f -exec chmod -c -x {} ';'
 
@@ -72,6 +77,7 @@ rm -rf %{buildroot}
 %changelog
 * Sat Nov 05 2011 Iain Arnell <iarn...@gmail.com> 0.997.001-1
 - update to latest upstream version
+- apply patch to fix rt#69084
 
 * Tue Jun 21 2011 Marcela Mašláňová <mmasl...@redhat.com> - 0.997-6
 - Perl mass rebuild
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

Reply via email to