Codebase list libcapture-tiny-perl / 1f46773
improve documentation around scalar/tied handles David Golden 12 years ago
1 changed file(s) with 9 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
579579 *Scalar filehandles*
580580
581581 If STDOUT or STDERR are reopened to scalar filehandles prior to the call to
582 {capture} or {tee}, then Capture::Tiny will override the output filehandle for the
583 duration of the {capture} or {tee} call and then send captured output to the
584 output filehandle after the capture is complete. (Requires Perl 5.8)
582 {capture} or {tee}, then Capture::Tiny will override the output filehandle for
583 the duration of the {capture} or {tee} call and then, for {tee}, send captured
584 output to the output filehandle after the capture is complete. (Requires Perl
585 5.8)
585586
586587 Capture::Tiny attempts to preserve the semantics of STDIN opened to a scalar
587 reference.
588 reference, but note that external processes will not be able to read from such
589 a handle. Capture::Tiny tries to ensure that external processes will read from
590 the null device instead, but this is not guaranteed.
588591
589592 *Tied output filehandles*
590593
604607 Capture::Tiny attempts to preserve the semantics of tied STDIN, but this is not
605608 entirely stable or portable. For example:
606609
607 * Capturing or teeing with STDIN tied is broken on Windows
608 * [FCGI] has been reported as having a pathological tied filehandle implementation
609 that causes fatal (and hard to diagnose) errors
610 * Trying does not affect how external processes read data
611 * Capturing or teeing with STDIN tied has been reported broken on Windows
610612
611613 Unless having STDIN tied is crucial, it may be safest to localize STDIN when
612614 capturing: