This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix typo in perlreapi(1perl).
[perl5.git] / pod / perlreapi.pod
index 3d0962a..2221764 100644 (file)
@@ -21,6 +21,7 @@ following format:
                          void* data, U32 flags);
         char*   (*intuit) (pTHX_
                            REGEXP * const rx, SV *sv,
+                          const char * const strbeg,
                            char *strpos, char *strend, U32 flags,
                            struct re_scream_pos_data_s *data);
         SV*     (*checkstr) (pTHX_ REGEXP * const rx);
@@ -286,9 +287,14 @@ Optimisation flags; subject to change.
 
 =head2 intuit
 
-    char* intuit(pTHX_ REGEXP * const rx,
-                  SV *sv, char *strpos, char *strend,
-                  const U32 flags, struct re_scream_pos_data_s *data);
+    char* intuit(pTHX_
+               REGEXP * const rx,
+               SV *sv,
+               const char * const strbeg,
+               char *strpos,
+               char *strend,
+               const U32 flags,
+               struct re_scream_pos_data_s *data);
 
 Find the start position where a regex match should be attempted,
 or possibly if the regex engine should not be run because the
@@ -296,6 +302,21 @@ pattern can't match.  This is called, as appropriate, by the core,
 depending on the values of the C<extflags> member of the C<regexp>
 structure.
 
+Arguments:
+
+    rx:     the regex to match against
+    sv:     the SV being matched: only used for utf8 flag; the string
+           itself is accessed via the pointers below. Note that on
+           something like an overloaded SV, SvPOK(sv) may be false
+           and the string pointers may point to something unrelated to
+           the SV itself.
+    strbeg: real beginning of string
+    strpos: the point in the string at which to begin matching
+    strend: pointer to the byte following the last char of the string
+    flags   currently unused; set to 0
+    data:   currently unused; set to NULL
+
+
 =head2 checkstr
 
     SV*        checkstr(pTHX_ REGEXP * const rx);
@@ -315,7 +336,7 @@ Perl will handle releasing anything else contained in the C<regexp> structure.
 =head2 Numbered capture callbacks
 
 Called to get/set the value of C<$`>, C<$'>, C<$&> and their named
-equivalents, ${^PREMATCH}, ${^POSTMATCH} and $^{MATCH}, as well as the
+equivalents, ${^PREMATCH}, ${^POSTMATCH} and ${^MATCH}, as well as the
 numbered capture groups (C<$1>, C<$2>, ...).
 
 The C<paren> parameter will be C<1> for C<$1>, C<2> for C<$2> and so