develooper Front page | perl.perl5.porters | Postings from March 2016

encoding pragma deprecation

Thread Next
From:
Rafael Garcia-Suarez
Date:
March 22, 2016 09:52
Subject:
encoding pragma deprecation
Message ID:
CAMoYMM_nQM-0Jijn65H4V05vM68OvGpXF-a9Xq4H-X9jjh2=-w@mail.gmail.com
It appears that encoding.pm provides a function _get_locale_encoding()
that applies several heuristics to get the encoding of the current
locale. This is used by the C<use open ":locale"> construct. So if we
remove the encoding pragma we break that obscure sub-functionality in
the open pragma.

From there there are several options:
- deprecate open ":locale"
- move _get_locale_encoding elsewhere, e.g. in open.pm itself
- or move it in a new module
- or move it in PerlIO::locale and incorporate it in the core (as a
saner alternative to global pragmas)

I'm willing to implement either of those options depending on
consensus. My personal favorite is #4.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About