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