Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, after I compiled perl5.8 from source (actually cross compiled), most things are working, but when I open a file, the @layers = PerlIO::get_layers($fh) is returning an empty array, which results in errors like "IO layers (like ':bytes') unavailable at ...." when I use some packages.

How are these IO layers get into perl? is it a build/configuration setting? I can't seem to find anything obvious, really appreciate your help.

Replies are listed 'Best First'.
Re: PerlIO layer unavailable
by ikegami (Patriarch) on Jul 30, 2010 at 20:17 UTC

    Quote 5.8.8's INSTALL:

    Starting from Perl 5.8, the default mechanism is to use the PerlIO abstraction, because it allows better control of I/O mechanisms, instead of having to work with (often, work around) vendors' I/O implementations.

    This PerlIO abstraction can be (but again, unless you know what you are doing, should not be) disabled either on the Configure command line with

    sh Configure -Uuseperlio

    or interactively at the appropriate Configure prompt.

    You appear to be overriding the default somehow.

Re: PerlIO layer unavailable
by RedElk (Hermit) on Jul 30, 2010 at 20:09 UTC
    I don't have an answer but this link might provide additional information for you.