Front page | perl.perl5.porters |
Postings from February 2022
on removing encoding.pm
Thread Next
From:
Ricardo Signes
Date:
February 10, 2022 03:16
Subject:
on removing encoding.pm
Message ID:
505d7c15-8e79-4c7a-b319-67886f0463d2@beta.fastmail.com
Porter,
According to the documentation of encoding.pm:
This module has been deprecated since perl v5.18. See "DESCRIPTION" and "BUGS".
I invite you to read the documentation, if you like, but: It's a big complicated library that has many sharp edges, and generally isn't needed because "everybody" has a UTF-8 editor nowadays and we have "use utf8".
When used in an even somewhat recent perl, encoding.pm either dies or emits a deprecation warning. But we have been getting good at actually giving deprecations teeth by removing them. I think we should do that with encoding.pm, especially as we have discussed adding a new library to do this job in a much, much simpler fashion. (source::encoding)
I don't think we should take over encoding.pm, because it has a long legacy of a weird interface that I don't want us to have to think about. But I think that "use encoding" should be unreservedly fatal in the future.
I think this means:
* making encoding.pm die on load on new perls (I suggested "no v5.38" but got funny looks on IRC ;) )
* asking Dan Kogai to consider splitting it into its own distribution; this is not vital
* updating our test suite, which uses encoding.pm a surprising number of times, to not use it
And then there are at least two questions:
1. Is this a bad idea?
2. If not, shall we target 5.36.0 for "fatal to use", even if only on activation, not load?
--
rjbs
Thread Next
-
on removing encoding.pm
by Ricardo Signes