List Info

Thread: PerlIO::encoding and !useperlio




PerlIO::encoding and !useperlio
user name
2007-11-05 08:07:03
lib/Pod/t/man.t has this:

my $have_encoding = eval { require PerlIO::encoding; 1; }
&& ! $;


The intent is to determine in advance whether this will
work:

    # We have a test in ISO 8859-1 encoding.  Make sure that
nothing strange
    # happens if Perl thinks the world is Unicode.
    binmode (*TMP, ':encoding(iso-8859-1)') if
$have_encoding;


However, if I build with -Uuseperlio, to disable PerlIO,
this require doesn't
fail:

$ ./perl -Ilib -e 'require PerlIO::encoding; warn
"Pass"'
Pass at -e line 1.


Should the require fail? Should PerlIO::encoding fail to
load on a perl where
it can't do anything?

Nicholas Clark

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )