Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I think it's worthwhile to think about what should happen if someone passes you a Perl filehandle, then closes it before EndDocument().

    What would happen with a duped filehandle? Would the duped one stay open if the original one gets closed?

    I think that it should behave the way a pure-Perl module mostly like would: closing the filehandle closes it out from under the module, too. The duping behaviour seems safer, but I worry that this safety net could veil bugs in client code, in which case

    • Unfortunately, that behaviour caused a segfault in some cases, which is why I was so keen to avoid it. I've worked around it by storing the file handle in a hash in the latest version, and releasing it when EndDocument() is called.