This appears to fix a hanging bug on Windows and is probably a good idea anyway. The original STDIN is glob-copied back to *STDIN before running the capture block, which should be sufficient for the block to see the tied STDIN. External programs wouldn't see the tied behavior anyway and will just get the proxied handle to /dev/null
For some reason, this avoids hangs during tee
This commit avoids duping and reopening STDIN, which isn't necessary for the main process.
Broken tied STDIN that can't OPEN will cause a fatal error. This code avoids opening STDIN unless we know it's safe because we proxied it. One example is FCGI, which uses a ref to a scalar as its tied object and thus can't reopen. C.f. https://rt.cpan.org/Ticket/Display.html?id=74861
Clarified some limitations; added a link to CPAN Testers Matrix; removed redundant BUGS section; standardized terminology
Fixes rt.cpan.org #73374 readline() only returns empty string on first read to EOF, so repeated reads from a custom handle were returning undef. This ensures that undef is converted to the empty string.