From d046ced764897282a72ac7029cf07a888c507543 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Fri, 17 Aug 2007 00:38:20 -0500 Subject: other doc fixes --- lib/IO/Pty/Easy.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm index a755ba7..6467324 100644 --- a/lib/IO/Pty/Easy.pm +++ b/lib/IO/Pty/Easy.pm @@ -27,7 +27,7 @@ our $VERSION = '0.01'; while (1) { my $input = # read a key here... - my $input = 'Elbereth' if $input eq "\ce"; + $input = 'Elbereth' if $input eq "\ce"; my $chars = $pty->write($input, 0); last if defined($chars) && $chars == 0; my $output = $pty->read(0); @@ -185,7 +185,7 @@ sub spawn { Read data from the process running on the pty. -C takes two optional arguments: the first is the amount of time to block for data (defaults to blocking forever, 0 means completely non-blocking), and the second is the maximum number of bytes to read (defaults to the value of C, usually 8192). +C takes two optional arguments: the first is the number of seconds (possibly fractional) to block for data (defaults to blocking forever, 0 means completely non-blocking), and the second is the maximum number of bytes to read (defaults to the value of C, usually 8192). The requirement for a maximum returned string length is a limitation imposed by the use of C, which we use internally. Returns C on timeout, the empty string on EOF (including if no subprocess is currently running on the pty), or a string of at least one character on success (this is consistent with C and L). @@ -215,7 +215,7 @@ sub read { Writes a string to the pty. -The first argument is the string to write, which is followed by one optional argument, the amount of time to block for, taking the same values as C. +The first argument is the string to write, which is followed by one optional argument, the number of seconds (possibly fractional) to block for, taking the same values as C. Returns undef on timeout, 0 on failure to write (including if no subprocess is running on the pty), or the number of bytes actually written on success (this may be less than the number of bytes requested; this should be checked for). -- cgit v1.2.3-54-g00ecf