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?

PerlIO is available and default in perl v5.8.0 and later. It is possible to build perl to not use PerlIO, however.

I know about the version requirement for PerlIO to be available. I am asking if there is a way, in CPAN metadata, to express that code expects $Config{useperlio} eq 'define' in the build of perl that is running the program, or do I need to consider the "PerlIO not available" case?

Replies are listed 'Best First'.
Re^3: How to declare a dependency on PerlIO in a CPAN module?
by Anonymous Monk on Sep 01, 2019 at 06:48 UTC

    . I am asking if there is a way, in CPAN metadata, to express that code expects $Config{useperlio} eq 'define' in the build of perl that is running the program,

    Why? C-requirements are defined in .c and .h files not in CPAN metadata.

    Which part of which file of your module depends on USE_PERLIO ( "perlio.h" )?

    Why is it important for CPAN metadata to know about C-level requirements ?

    Code in Build.PL/Makefile.PL is often used to check for missing .h or .c level dependencies. Some go a step further with Alien:: modules that install those dependencies.

    You can add in Makefile.PL any check of %Config prerequisites

    Devel::PPPort helps with compiling .xs modules on older versions of perl.h

    or do I need to consider the "PerlIO not available" case?

    Do you? Have you encountered a squeaky wheel that needs grease? cpantesters can help find squeaks

    PerlIO is a module ... but does it depend on USE_PERLIO? (does it matter?)

      Which part of which file of your module depends on USE_PERLIO ( "perlio.h" )?
      Why is it important for CPAN metadata to know about C-level requirements?

      It is important because there are features in the perl core that are available iff PerlIO is used. Unlike most C-level flags, USE_PERLIO has visible effects on Perl code. In particular, if PerlIO is not used, opening a scalar as a file does not work.

        It is important ...

        Thats what tests are for