1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: Doesn't work on 5.14 if you call prompt() in non-"main" package
Origin: upstream, https://metacpan.org/diff/file/?target=DCONWAY/IO-Prompt-0.997002/lib/IO/Prompt.pm&source=DCONWAY/IO-Prompt-0.997001/lib/IO/Prompt.pm
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=69084
Bug-Debian: http://bugs.debian.org/694537
Forwarded: not-needed
Author: Salvatore Bonaccorso <carnil@debian.org>
Last-Update: 2012-11-27
Applied-Upstream: yes
--- a/lib/IO/Prompt.pm
+++ b/lib/IO/Prompt.pm
@@ -183,9 +183,10 @@
open $IN, "</dev/tty" or croak "Cannot read from terminal: $!";
}
else {
+ use Scalar::Util;
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: $!";
}
|