@@ -1296,34 +1296,51 @@ Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN le
1296
1296
return gv ;
1297
1297
}
1298
1298
1299
-
1300
1299
/*
1301
1300
=for apidoc gv_autoload_pv
1302
1301
=for apidoc_item gv_autoload_pvn
1303
1302
=for apidoc_item gv_autoload_sv
1303
+ =for apidoc_item gv_autoload4
1304
1304
1305
1305
These each search for an C<AUTOLOAD> method, returning NULL if not found, or
1306
1306
else returning a pointer to its GV, while setting the package
1307
- L<C<$AUTOLOAD>|perlobj/AUTOLOAD> variable to C< name> (fully qualified). Also,
1308
- if found and the GV's CV is an XSUB, the CV's PV will be set to C< name> , and
1307
+ L<C<$AUTOLOAD>|perlobj/AUTOLOAD> variable to the name (fully qualified). Also,
1308
+ if found and the GV's CV is an XSUB, the CV's PV will be set to the name, and
1309
1309
its stash will be set to the stash of the GV.
1310
1310
1311
1311
Searching is done in L<C<MRO> order|perlmroapi>, as specified in
1312
1312
L</C<gv_fetchmeth>>, beginning with C<stash> if it isn't NULL.
1313
1313
1314
- The forms differ only in how C<name> is specified.
1314
+ C<gv_autoload4>) has a C<method> parameter; the others a C<flags> one (both
1315
+ types explained below). Otherwise, the forms differ only in how the name is
1316
+ specified.
1315
1317
1316
1318
In C<gv_autoload_pv>, C<namepv> is a C language NUL-terminated string.
1317
1319
1318
- In C<gv_autoload_pvn>, C<name> points to the first byte of the name, and an
1319
- additional parameter, C<len>, specifies its length in bytes. Hence, C<*name>
1320
- may contain embedded-NUL characters.
1320
+ In C<gv_autoload_pvn> and C<gv_autoload4>) , C<name> points to the first byte of
1321
+ the name, and an additional parameter, C<len>, specifies its length in bytes.
1322
+ Hence, C<*name> may contain embedded-NUL characters.
1321
1323
1322
1324
In C<gv_autoload_sv>, C<*namesv> is an SV, and the name is the PV extracted
1323
1325
from that using L</C<SvPV>>. If the SV is marked as being in UTF-8, the
1324
1326
extracted PV will also be.
1325
1327
1328
+ The other way to indicate that the name is encoded as UTF-8 is to set the
1329
+ C<SVf_UTF8> bit in C<flags> for the forms that have that parameter.
1330
+ The name is never considered to be UTF-8 in C<gv_autoload4>.
1331
+
1332
+ The C<method> parameter in C<gv_autoload4> is used only to indicate that the
1333
+ name is for a method (non-zero), or not (zero). The other forms use the
1334
+ C<GV_AUTOLOAD_ISMETHOD> bit in C<flags> to indicate this.
1335
+
1336
+ The only other significant value in C<flags> currently is C<GV_SUPER>
1337
+ to indicate, if set, to skip searching for the name in C<stash>.
1338
+
1326
1339
=cut
1340
+
1341
+ =for apidoc Amnh||GV_AUTOLOAD_ISMETHOD
1342
+ =for apidoc Amnh||SVf_UTF8
1343
+ =for apidoc Amnh||GV_SUPER
1327
1344
*/
1328
1345
1329
1346
GV *
0 commit comments