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

RFC: Removing several undocumented functions from the Perl core

Thread Next
Karl Williamson
November 27, 2012 14:32
RFC: Removing several undocumented functions from the Perl core
Message ID:
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

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.

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