[poe-commits] poe/POE/Wheel ReadLine.pm,1.27,1.28
Brought to you by:
rcaputo
From: <rc...@us...> - 2003-09-16 19:49:47
|
Update of /cvsroot/poe/poe/POE/Wheel In directory sc8-pr-cvs1:/tmp/cvs-serv15755/POE/Wheel Modified Files: ReadLine.pm Log Message: Supply a B38400 symbol if the local version of POSIX.pm won't. Index: ReadLine.pm =================================================================== RCS file: /cvsroot/poe/poe/POE/Wheel/ReadLine.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ReadLine.pm 27 Aug 2003 01:50:48 -0000 1.27 --- ReadLine.pm 16 Sep 2003 19:49:43 -0000 1.28 *************** *** 10,14 **** use Symbol qw(gensym); use POE qw(Wheel); ! use POSIX qw(B38400); # Things we'll need to interact with the terminal. --- 10,14 ---- use Symbol qw(gensym); use POE qw(Wheel); ! use POSIX; # Things we'll need to interact with the terminal. *************** *** 86,95 **** # getting uglier. # Get the terminal speed for Term::Cap. ! my $ospeed = B38400; eval { my $termios = POSIX::Termios->new(); $termios->getattr(); ! $ospeed = $termios->getospeed() || B38400; }; --- 86,100 ---- # getting uglier. + # Some platforms don't define this constant. + unless (defined \&POSIX::B38400) { + eval "sub POSIX::B38400 () { 0 }"; + } + # Get the terminal speed for Term::Cap. ! my $ospeed = POSIX::B38400(); eval { my $termios = POSIX::Termios->new(); $termios->getattr(); ! $ospeed = $termios->getospeed() || POSIX::B38400(); }; |