Craig A. Berry [Tue, 27 Nov 2001 22:28:50 +0000 (16:28 -0600)]
Subject: [PATCH perl@13323] Termcap.pm with no termios
Message-Id: <
a05101003b82a151fda85@[192.168.56.184]>
p4raw-id: //depot/perl@13335
require 5.004;
+use Config;
use Pod::Text ();
use POSIX ();
use Term::Cap;
$ENV{TERMPATH} = "$ENV{HOME}/.termcap:/etc/termcap"
. ":/usr/share/misc/termcap:/usr/share/lib/termcap";
- my $termios = POSIX::Termios->new;
- $termios->getattr;
- my $ospeed = $termios->getospeed;
+ my $ospeed = '9600';
+ if (defined $Config{'i_termios'}) {
+ my $termios = POSIX::Termios->new;
+ $termios->getattr;
+ $ospeed = $termios->getospeed;
+ }
my $term;
eval { $term = Tgetent Term::Cap { TERM => undef, OSPEED => $ospeed } };
$$self{BOLD} = $$term{_md} || "\e[1m";