summaryrefslogtreecommitdiff
path: root/dist/Term-ReadLine
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-09-14 23:02:01 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-15 08:19:02 -0700
commit53e7e3c6146453e002adec01fcdd3fb72e1259f4 (patch)
treee8c3c08733473bbfde311e2fcdd3b7ac6e52a278 /dist/Term-ReadLine
parent6e9fdf669f1f006544b537fb5ffb2d3212704cfa (diff)
downloadperl-53e7e3c6146453e002adec01fcdd3fb72e1259f4.tar.gz
Term::ReadLine: Check $^O before -e
Put faster checks first. $^O is internal to perl, but -e has to go out to the file system.
Diffstat (limited to 'dist/Term-ReadLine')
-rw-r--r--dist/Term-ReadLine/lib/Term/ReadLine.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/Term-ReadLine/lib/Term/ReadLine.pm b/dist/Term-ReadLine/lib/Term/ReadLine.pm
index 80a0d4bac8..09f9527b93 100644
--- a/dist/Term-ReadLine/lib/Term/ReadLine.pm
+++ b/dist/Term-ReadLine/lib/Term/ReadLine.pm
@@ -233,9 +233,9 @@ sub findConsole {
my $console;
my $consoleOUT;
- if (-e "/dev/tty" and $^O ne 'MSWin32') {
+ if ($^O ne 'MSWin32' and -e "/dev/tty") {
$console = "/dev/tty";
- } elsif (-e "con" or $^O eq 'MSWin32' or $^O eq 'msys') {
+ } elsif ($^O eq 'MSWin32' or $^O eq 'msys' or -e "con") {
$console = 'CONIN$';
$consoleOUT = 'CONOUT$';
} elsif ($^O eq 'VMS') {