1IO(3) User Contributed Perl Documentation IO(3)
2
3
4
6 Tk::IO - high level interface to Tk's 'fileevent' mechanism
7
9 my $fh = Tk::IO->new(-linecommand => callback, -childcommand => callback);
10 $fh->exec("command")
11 $fh->wait
12 $fh->kill
13
15 INTERFACES TO THIS MODULE MAY CHANGE AS PERL'S IO EVOLVES AND WITH PORT
16 OF TK4.1
17
19 Tk::IO is now layered on perl's IO::Handle class. Interfaces have
20 changed, and are still evolving.
21
22 In theory C methods which enable non-blocking IO as in earlier Tk-b*
23 release(s) are still there. I have not changed them to use perl's
24 additional Configure information, or tested them much.
25
26 Assumption is that exec is used to fork a child process and a callback
27 is called each time a complete line arrives up the implied pipe.
28
29 "line" should probably be defined in terms of perl's input record
30 separator but is not yet.
31
32 The -childcommand callback is called when end-of-file occurs.
33
34 $fh->wait can be used to wait for child process while processing other
35 Tk events.
36
37 $fh->kill can be used to send signal to child process.
38
40 Still not finished. Idea is to use "exec" to emulate "system" in a
41 non-blocking manner.
42
43
44
45perl v5.28.1 2019-02-12 IO(3)