Subject: | [PATCH] Fix findConsole() on Windows when \dev\tty exists on the current drive |
The attached patch has just been applied to blead in commit 4cc026083a
to fix a problem with the cpan and cpanp shells not working on Windows
if the current drive happens to contain a \dev\tty file (as reported on
CPAN RT#79001, 79064).
Please consider incorporating this patch into your next CPAN release of
Term-ReadLine.
Subject: | tty.patch |
diff -ruN Term-ReadLine-1.09.orig/lib/Term/ReadLine.pm Term-ReadLine-1.09/lib/Term/ReadLine.pm
--- Term-ReadLine-1.09.orig/lib/Term/ReadLine.pm 2012-03-26 13:50:10.000000000 +0100
+++ Term-ReadLine-1.09/lib/Term/ReadLine.pm 2012-08-18 13:17:37.008796500 +0100
@@ -233,7 +233,7 @@
my $console;
my $consoleOUT;
- if (-e "/dev/tty") {
+ if (-e "/dev/tty" and $^O ne 'MSWin32') {
$console = "/dev/tty";
} elsif (-e "con" or $^O eq 'MSWin32') {
$console = 'CONIN$';
@@ -327,7 +327,7 @@
package Term::ReadLine; # So late to allow the above code be defined?
-our $VERSION = '1.09';
+our $VERSION = '1.10';
my ($which) = exists $ENV{PERL_RL} ? split /\s+/, $ENV{PERL_RL} : undef;
if ($which) {