develooper Front page | perl.perl5.porters | Postings from November 2012

Re: RFC: Removing several undocumented functions from the Perl core

Thread Previous | Thread Next
Steve Peters
November 28, 2012 01:46
Re: RFC: Removing several undocumented functions from the Perl core
Message ID:
On Tue, Nov 27, 2012 at 4:31 PM, Karl Williamson <>wrote:

> There are several functions that are no longer used in the Perl core that
> could be removed, along with their associated interpreter variables.  These
> are
>  is_uni_idfirst_lc
>  is_utf8_idfirst
>  is_utf8_xidfirst
>  is_utf8_idcont
> In addition, is_uni_idfirst and is_utf8_xidcont should be removed from the
> core, replaced by ones that call internally known versions.  This is
> because Perl has slightly different definitions of what these should match (
> and the current ones are getting the wrong definitions.
> And is_utf8_mark should also be removed.  It is used in places by code
> that implements an obsolete definition of a grapheme cluster.  The current
> definition doesn't need marks explicitly; so those places should change to
> use the more modern definition.
> None of these functions are documented.  They are listed in perlapi under
> "Undocumented functions" with this caveat:
> "The following functions have been flagged as part of the public API, but
> are currently undocumented. Use them at your own risk, as the interfaces
> are subject to change."
> There should be no reason for xs code to access these.  They don't (or
> shouldn't) return the exact same results as Perl's core uses, and are
> otherwise for outmoded views into Unicode.
> cpan grep with
> -file:"ppport\.h|PPPort\.pm" is_(uni|utf8)_(mark|x?id(**first|cont))
> returned 16 results.  None of them look like they are actually using these
> functions except as compatibility measures.
> I propose removing them.

Removing them is decently risky.  I can't say we exactly know what the
blackpan is doing with them.  Things that are deprecated in the API are
supposed to be moved to mathoms.c where they can be optimized out with a
-DNO_MATHOMS when compiling.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About