From: Craig A. Berry Date: Tue, 27 Nov 2001 22:28:50 +0000 (-0600) Subject: (replaced by #13336) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ef7c2e567196652a85b06b3c848967334ceef2c;p=p5sagit%2Fp5-mst-13.2.git (replaced by #13336) Subject: [PATCH perl@13323] Termcap.pm with no termios Message-Id: p4raw-id: //depot/perl@13335 --- diff --git a/lib/Pod/Text/Termcap.pm b/lib/Pod/Text/Termcap.pm index 6d8513b..94ea316 100644 --- a/lib/Pod/Text/Termcap.pm +++ b/lib/Pod/Text/Termcap.pm @@ -18,6 +18,7 @@ package Pod::Text::Termcap; require 5.004; +use Config; use Pod::Text (); use POSIX (); use Term::Cap; @@ -46,9 +47,12 @@ sub initialize { $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";