Quoth rgarciasuarez gmail.com ("Rafael
Garcia-Suarez"):
> On 17/09/2007, David Cantrell <david cantrell.org.uk> wrote:
> > On Sat, Sep 15, 2007 at 02:44:27PM +0200,
macosx.perl.org xmlizer.biz wrote:
> >
> > > [[
> > > use open IN =>
":encoding(UTF16-BE)";
> > > use constant A => 1;
> > > ]]
> > >
> > > 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!
No, not really. Things are working as documented. There is a
more
general problem here, which is that open.pm tries to apply
random PerlIO
layers to module files. In general this is not going to
work. Should
perhaps C<require MODULE> (as opposed to C<require
STRING>) be changed
to not honour the default open layers? Does that introduce
back-compat
issues? Otherwise the only even slightly safe way to use
open.pm is in
an INIT block.
Ben
|