perl-unicode

Preventing bytes.pm to be loaded by Encode.pm

2004-01-06 04:30:04
Hi,

I noticed that in Encode versions higher than 1.83 (which came with
Perl 5.8.0), including the recent 1.99, the predefine_encodings()
subroutine has been expanded by *cat_decode(). Not sure what this is
for, but it now requires Encode.pm to always require bytes.pm on
BEGIN, even if it is not needed. In order to keep the %INC list as
small as possible, for speed optimisation, I thought the dependancy to
bytes.pm may be removed by changing the current code

        use bytes;

to

        # this may be an alternative to always require bytes.pm on BEGIN:
        Encode::_utf8_off($rsrc);
        Encode::_utf8_off($trm);

I think switching to the bytes semantics was only done in regards to
$rsrc and $trm so why not using the alternative method mentioned
above?


best,
rob.
--

<Prev in Thread] Current Thread [Next in Thread>
  • Preventing bytes.pm to be loaded by Encode.pm, Robert Allerstorfer <=