On 17/09/2007, David Cantrell <[EMAIL PROTECTED]> wrote:
> On Sat, Sep 15, 2007 at 02:44:27PM +0200, [EMAIL PROTECTED] wrote:
>
> > If I run this script:
> > #!/usr/bin/perl
> > use open IN  => ":byte";

If you use open IN => ":bytes", that works.

What happens is that perl tries to load PerlIO::byte, in order to read
constant.pm. But this PerlIO layer isn't found, hence the (suboptimal
and buggy) error message.

> > use constant A => 1;
> >
> > on a MacBook Pro (Intel) with perl version 5.8.6 (the pre-installed) I
> > get this error:
> >   Can't locate constant.pm in @INC  ...
> >
> > if I change the line to:
> > use open IN  => ":encoding(UTF16-BE)";
> >
> > I get this error:
> >   Unrecognized character \xE0 at /System/Library/Perl/5.8.6/constant.pm 
> > line 1.
>
> I get similar with 5.8.7 and 5.9.5 on NetBSD/Alpha, and 5.10.0 patch 31863
> on Solaris/SPARC.  Congratulations, it looks like you've found a bug in
> perl!
>
> > In both cases:
> > If I swap the lines, everything runs smoothly.
>
> Same here. I've CCed p5p on this mail.
>
> --
> David Cantrell | A machine for turning tea into grumpiness
>
>     "There's a hole in my bucket, dear Liza, dear Liza."
>     "WHAT MAKES YOU SAY THERE IS A HOLE IN YOUR BUCKET?"
>

Reply via email to