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

RFC: Removing several undocumented functions from the Perl core

Thread Next
From:
Karl Williamson
Date:
November 27, 2012 14:32
Subject:
RFC: Removing several undocumented functions from the Perl core
Message ID:
50B53F4B.1030207@khwilliamson.com
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 (http://rt.perl.org/rt3/Ticket/Display.html?id=74022), 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


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