Change 33701 by [EMAIL PROTECTED] on 2008/04/16 16:08:04
Avoid forwards and then backwards on the :: splitting logic in
Perl_gv_fetchmethod_autoload()
Affected files ...
... //depot/perl/gv.c#392 edit
Differences ...
==== //depot/perl/gv.c#392 (text) ====
Index: perl/gv.c
--- perl/gv.c#391~33696~ 2008-04-16 03:59:28.000000000 -0700
+++ perl/gv.c 2008-04-16 09:08:04.000000000 -0700
@@ -618,6 +618,7 @@
const char *nsplit = NULL;
GV* gv;
HV* ostash = stash;
+ const char * const origname = name;
PERL_ARGS_ASSERT_GV_FETCHMETHOD_AUTOLOAD;
@@ -625,16 +626,16 @@
stash = NULL;
for (nend = name; *nend; nend++) {
- if (*nend == '\'')
+ if (*nend == '\'') {
nsplit = nend;
- else if (*nend == ':' && *(nend + 1) == ':')
- nsplit = ++nend;
+ name = nend + 1;
+ }
+ else if (*nend == ':' && *(nend + 1) == ':') {
+ nsplit = nend++;
+ name = nend + 1;
+ }
}
if (nsplit) {
- const char * const origname = name;
- name = nsplit + 1;
- if (*nsplit == ':')
- --nsplit;
if ((nsplit - origname) == 5 && memEQ(origname, "SUPER", 5)) {
/* ->SUPER::method should really be looked up in original stash */
SV * const tmpstr = sv_2mortal(Perl_newSVpvf(aTHX_ "%s::SUPER",
End of Patch.