Commit 8b7a2b6cc8 for perl

commit 8b7a2b6cc8ea1b1e15a1f19dc609fb0c795d5cdc
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Nov 25 03:28:07 2026 -0700

    regen/regcharclass.pl: Generate API for 'what_len' macros

    Commit 7838a4632996eab80c11128f9cb23a31f765e574 added auto generation of
    perlintern entries for macros defined by this script.  At that time, I
    punted on generating documentation for macros whose names begin with
    'what_len'.  This commit adds that.

diff --git a/regcharclass.h b/regcharclass.h
index b98990bb31..8afdd089ee 100644
--- a/regcharclass.h
+++ b/regcharclass.h
@@ -5037,6 +5037,6 @@ character actually occupies.
  * 94644b4e53ef4f2590ef86a261dcd22ffadf79247fcc7f31c4ebf5b19111fd25 lib/unicore/mktables
  * a0079d7556b20c2de1fdc3d492797a91b8ec8a06006f94460006185cb6380962 lib/unicore/version
  * 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl
- * f418bbdc4cd3af9f64c0b8248f862ec5e6df1a00e8583cb797c52e6903d13d47 regen/regcharclass.pl
+ * a6d09720442ac49900ec71aa8d1102f5a63c14b419a8f5bba61aa393572fec79 regen/regcharclass.pl
  * ea16ffd33f6130e7e38a027c21bdea415a7d96efb3741d7cd731243df769581b regen/regcharclass_multi_char_folds.pl
  * ex: set ro ft=c: */
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl
index ab557cacb2..7f0f61f90e 100755
--- a/regen/regcharclass.pl
+++ b/regen/regcharclass.pl
@@ -1526,7 +1526,7 @@ sub make_macro {
         }
     }
     my $ret_type= $opts{ret_type} || ( $opts{type} =~ /^cp/ ? 'cp' : 'len' );
-    my $returns_cp = $ret_type eq 'cp';
+    my $returns_cp = $ret_type =~ /^(cp|both)$/;
     my $method;
     if ( $opts{safe} ) {
         $method= 'length_optree';
@@ -1689,7 +1689,11 @@ sub make_macro {
      if ($ret_type eq 'both') {
         push @args, "len";
         $doc_arglist .= "|STRLEN len";
-        warn "Generating apidoc for -both is currently unimplemented";
+        $doc_text .= <<~EOT;
+
+            C<len> is the name of a variable which gets set to the number of
+            bytes actually matched.
+            EOT
     }

     my $pfx= $ret_type eq 'both'    ? 'what_len_' :