in reply to Re: How to declare a dependency on PerlIO in a CPAN module?
in thread How to declare a dependency on PerlIO in a CPAN module?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to declare a dependency on PerlIO in a CPAN module?
by haukex (Archbishop) on Sep 02, 2019 at 06:25 UTC | |
by jcb (Parson) on Sep 02, 2019 at 21:32 UTC | |
by haukex (Archbishop) on Sep 03, 2019 at 14:00 UTC | |
by jcb (Parson) on Sep 04, 2019 at 02:23 UTC | |
by haukex (Archbishop) on Sep 05, 2019 at 13:31 UTC |