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

. 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?)

  • Comment on Re^3: How to declare a dependency on PerlIO in a CPAN module?

Replies are listed 'Best First'.
Re^4: How to declare a dependency on PerlIO in a CPAN module?
by jcb (Parson) on Sep 01, 2019 at 22:39 UTC
    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