Codebase list libcapture-tiny-perl / f7e9afe
updated POD and todo David Golden 15 years ago
4 changed file(s) with 55 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
8484 guaranteed to be properly ordered due to buffering
8585
8686 LIMITATIONS
87 Portability
8788 Portability is a goal, not a guarantee. "tee" requires fork, except on
8889 Windows where "system(1, @cmd)" is used instead. Not tested on any
89 esoteric platforms yet.
90 particularly esoteric platforms yet.
9091
92 Closing STDIN, STDOUT or STDERR
9193 Capture::Tiny will work even if STDIN, STDOUT or STDERR have been
9294 previously closed. However, since they may be reopened to capture or tee
9395 output, any code within the captured block that depends on finding them
9496 closed will, of course, not find them to be closed. If they started
9597 closed, Capture::Tiny will reclose them again when the capture block
9698 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.
97113
98114 BUGS
99115 Please report any bugs or feature requests using the CPAN Request
33 # A copy of the License was distributed with this file or you may obtain a
44 # copy of the License from http://www.apache.org/licenses/LICENSE-2.0
55
6 - Test fake handles (open FH, ">", \$scalar), IO::String, etc.
76 - Test utf8 output
8 - Test tied handles
97 - Test with curses
108 - Add tee_stdout and tee_stderr functions (?)
354354
355355 = LIMITATIONS
356356
357 == Portability
358
357359 Portability is a goal, not a guarantee. {tee} requires fork, except on
358360 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
360364
361365 Capture::Tiny will work even if STDIN, STDOUT or STDERR have been previously
362366 closed. However, since they may be reopened to capture or tee output, any code
363367 within the captured block that depends on finding them closed will, of course,
364368 not find them to be closed. If they started closed, Capture::Tiny will reclose
365369 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.
366384
367385 = BUGS
368386
9797
9898 =head1 LIMITATIONS
9999
100 =head2 Portability
101
100102 Portability is a goal, not a guarantee. C<<< tee >>> requires fork, except on
101103 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
103107
104108 Capture::Tiny will work even if STDIN, STDOUT or STDERR have been previously
105109 closed. However, since they may be reopened to capture or tee output, any code
107111 not find them to be closed. If they started closed, Capture::Tiny will reclose
108112 them again when the capture block finishes.
109113
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
110128 =head1 BUGS
111129
112130 Please report any bugs or feature requests using the CPAN Request Tracker.