summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/attrs/attrs.xs5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/attrs/attrs.xs b/ext/attrs/attrs.xs
index e3ba012d69..c7fce1921a 100644
--- a/ext/attrs/attrs.xs
+++ b/ext/attrs/attrs.xs
@@ -52,8 +52,9 @@ SV * sub
sub = Nullsv;
}
else {
- const char * const name = SvPV_nolen(sub);
- sub = (SV*)perl_get_cv(name, FALSE);
+ STRLEN len;
+ const char * const name = SvPV(sub, len);
+ sub = (SV*)get_cvn_flags(name, len, SvUTF8(sub));
}
if (!sub)
croak("invalid subroutine reference or name");