updated POD and todo
David Golden
15 years ago
84 | 84 | guaranteed to be properly ordered due to buffering |
85 | 85 | |
86 | 86 | LIMITATIONS |
87 | Portability | |
87 | 88 | Portability is a goal, not a guarantee. "tee" requires fork, except on |
88 | 89 | Windows where "system(1, @cmd)" is used instead. Not tested on any |
89 | esoteric platforms yet. | |
90 | particularly esoteric platforms yet. | |
90 | 91 | |
92 | Closing STDIN, STDOUT or STDERR | |
91 | 93 | Capture::Tiny will work even if STDIN, STDOUT or STDERR have been |
92 | 94 | previously closed. However, since they may be reopened to capture or tee |
93 | 95 | output, any code within the captured block that depends on finding them |
94 | 96 | closed will, of course, not find them to be closed. If they started |
95 | 97 | closed, Capture::Tiny will reclose them again when the capture block |
96 | 98 | finishes. |
99 | ||
100 | Modifying STDIN, STDOUT or STDERR | |
101 | If STDOUT or STDERR are modified -- e.g. tied or opened to a scalar | |
102 | reference -- prior to the call to "capture" or "tee", then Capture::Tiny | |
103 | will override the tie or scalar reference handle for the duration of | |
104 | "capture" or "tee" call. In the case of a scalar reference handle and | |
105 | "tee", captured output will be sent to the scalar reference handle after | |
106 | "tee" finishes. | |
107 | ||
108 | Capture::Tiny attempts to preserve the semantics of tied STDIN or STDIN | |
109 | opened to a scalar reference. | |
110 | ||
111 | Attempting to modify STDIN, STDOUT or STDERR *during* "capture" or "tee" | |
112 | is almost certainly going to cause problems. Don't do that. | |
97 | 113 | |
98 | 114 | BUGS |
99 | 115 | Please report any bugs or feature requests using the CPAN Request |
3 | 3 | # A copy of the License was distributed with this file or you may obtain a |
4 | 4 | # copy of the License from http://www.apache.org/licenses/LICENSE-2.0 |
5 | 5 | |
6 | - Test fake handles (open FH, ">", \$scalar), IO::String, etc. | |
7 | 6 | - Test utf8 output |
8 | - Test tied handles | |
9 | 7 | - Test with curses |
10 | 8 | - Add tee_stdout and tee_stderr functions (?) |
354 | 354 | |
355 | 355 | = LIMITATIONS |
356 | 356 | |
357 | == Portability | |
358 | ||
357 | 359 | Portability is a goal, not a guarantee. {tee} requires fork, except on |
358 | 360 | Windows where {system(1, @cmd)} is used instead. Not tested on any |
359 | esoteric platforms yet. | |
361 | particularly esoteric platforms yet. | |
362 | ||
363 | == Closing STDIN, STDOUT or STDERR | |
360 | 364 | |
361 | 365 | Capture::Tiny will work even if STDIN, STDOUT or STDERR have been previously |
362 | 366 | closed. However, since they may be reopened to capture or tee output, any code |
363 | 367 | within the captured block that depends on finding them closed will, of course, |
364 | 368 | not find them to be closed. If they started closed, Capture::Tiny will reclose |
365 | 369 | them again when the capture block finishes. |
370 | ||
371 | == Modifying STDIN, STDOUT or STDERR | |
372 | ||
373 | If STDOUT or STDERR are modified -- e.g. tied or opened to a scalar reference | |
374 | -- prior to the call to {capture} or {tee}, then Capture::Tiny will override | |
375 | the tie or scalar reference handle for the duration of {capture} or {tee} call. | |
376 | In the case of a scalar reference handle and {tee}, captured output will be | |
377 | sent to the scalar reference handle after {tee} finishes. | |
378 | ||
379 | Capture::Tiny attempts to preserve the semantics of tied STDIN or STDIN opened | |
380 | to a scalar reference. | |
381 | ||
382 | Attempting to modify STDIN, STDOUT or STDERR ~during~ {capture} or {tee} is | |
383 | almost certainly going to cause problems. Don't do that. | |
366 | 384 | |
367 | 385 | = BUGS |
368 | 386 |
97 | 97 | |
98 | 98 | =head1 LIMITATIONS |
99 | 99 | |
100 | =head2 Portability | |
101 | ||
100 | 102 | Portability is a goal, not a guarantee. C<<< tee >>> requires fork, except on |
101 | 103 | Windows where C<<< system(1, @cmd) >>> is used instead. Not tested on any |
102 | esoteric platforms yet. | |
104 | particularly esoteric platforms yet. | |
105 | ||
106 | =head2 Closing STDIN, STDOUT or STDERR | |
103 | 107 | |
104 | 108 | Capture::Tiny will work even if STDIN, STDOUT or STDERR have been previously |
105 | 109 | closed. However, since they may be reopened to capture or tee output, any code |
107 | 111 | not find them to be closed. If they started closed, Capture::Tiny will reclose |
108 | 112 | them again when the capture block finishes. |
109 | 113 | |
114 | =head2 Modifying STDIN, STDOUT or STDERR | |
115 | ||
116 | If STDOUT or STDERR are modified -- e.g. tied or opened to a scalar reference | |
117 | -- prior to the call to C<<< capture >>> or C<<< tee >>>, then Capture::Tiny will override | |
118 | the tie or scalar reference handle for the duration of C<<< capture >>> or C<<< tee >>> call. | |
119 | In the case of a scalar reference handle and C<<< tee >>>, captured output will be | |
120 | sent to the scalar reference handle after C<<< tee >>> finishes. | |
121 | ||
122 | Capture::Tiny attempts to preserve the semantics of tied STDIN or STDIN opened | |
123 | to a scalar reference. | |
124 | ||
125 | Attempting to modify STDIN, STDOUT or STDERR I<during> C<<< capture >>> or C<<< tee >>> is | |
126 | almost certainly going to cause problems. Don't do that. | |
127 | ||
110 | 128 | =head1 BUGS |
111 | 129 | |
112 | 130 | Please report any bugs or feature requests using the CPAN Request Tracker. |