summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/mro/mro.pm2
-rw-r--r--ext/mro/mro.xs12
2 files changed, 4 insertions, 10 deletions
diff --git a/ext/mro/mro.pm b/ext/mro/mro.pm
index d95733bd41..6637ea8eb7 100644
--- a/ext/mro/mro.pm
+++ b/ext/mro/mro.pm
@@ -12,7 +12,7 @@ use warnings;
# mro.pm versions < 1.00 reserved for MRO::Compat
# for partial back-compat to 5.[68].x
-our $VERSION = '1.27';
+our $VERSION = '1.28';
require XSLoader;
XSLoader::load('mro');
diff --git a/ext/mro/mro.xs b/ext/mro/mro.xs
index 79293c035a..ba9921f469 100644
--- a/ext/mro/mro.xs
+++ b/ext/mro/mro.xs
@@ -505,7 +505,6 @@ mro__nextcan(...)
cxix = __dopoptosub_at(ccstack, cxix);
for (;;) {
GV* cvgv;
- STRLEN fq_subname_len;
/* we may be in a higher stacklevel, so dig down deeper */
while (cxix < 0) {
@@ -546,19 +545,14 @@ mro__nextcan(...)
if(SvPOK(sv)) {
fq_subname = SvPVX(sv);
- fq_subname_len = SvCUR(sv);
-
- subname_utf8 = SvUTF8(sv) ? 1 : 0;
subname = strrchr(fq_subname, ':');
- } else {
- subname = NULL;
- }
-
+ }
if(!subname)
Perl_croak(aTHX_ "next::method/next::can/maybe::next::method cannot find enclosing method");
+ subname_utf8 = SvUTF8(sv) ? 1 : 0;
subname++;
- subname_len = fq_subname_len - (subname - fq_subname);
+ subname_len = SvCUR(sv) - (subname - fq_subname);
if(memEQs(subname, subname_len, "__ANON__")) {
cxix = __dopoptosub_at(ccstack, cxix - 1);
continue;