Fortunately, most of the code does not rely on being able to use in-memory filehandles, only the feature for parsing "application/warc-fields" from a string. Unfortunately, that feature is how the test suite tests parsing, so I will have to do something similar to your suggestion to skip those tests.

And you are right — better to just try it than to rely on testing $Config{useperlio}, on the off chance that some future perl might support it even without PerlIO. (Both the BSDs and the GNU C Library have similar facilities in their stdio implementations.)

Since I am using tied filehandles as part of my API, the code cannot work on perls older than 5.8, (there are a few versions in the 5.005 and 5.6 series that might work, (when was tie *HANDLE,... introduced anyway?) but IO::Uncompress::Gunzip documents a bug in 5.8.0 that prevents lexical filehandles from being closed properly in some cases, so 5.8.1 is the minimal version) and PerlIO is default in 5.8 and later. I am unsure if my code will ever be run on a perl built without PerlIO, but I want to be sure to produce a reasonable error if PerlIO is actually needed to fulfill a user request and not available.


In reply to Re^2: How to declare a dependency on PerlIO in a CPAN module? by jcb
in thread How to declare a dependency on PerlIO in a CPAN module? by jcb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.