diff options
author | Chip Salzenberg <chip@perl.com> | 1997-02-11 10:11:59 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-02-18 13:22:00 +1200 |
commit | 15ff848f77796a7eb1aa7d49b2bc68dd9e9c24f9 (patch) | |
tree | 10c6528a382988bd59ab4cc7a73eac9d660e2391 /pp_hot.c | |
parent | 9d17b0a6244cecb9ba7d42c6a1a882fd933f6f45 (diff) | |
download | perl-15ff848f77796a7eb1aa7d49b2bc68dd9e9c24f9.tar.gz |
Fix sub call through magic var (e.g. C<&$1>)
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1706,9 +1706,14 @@ PP(pp_entersub) if (sv == &sv_yes) /* unfound import, ignore */ RETURN; - if (!SvOK(sv)) + if (SvGMAGICAL(sv)) { + mg_get(sv); + sym = SvPOKp(sv) ? SvPVX(sv) : Nullch; + } + else + sym = SvPV(sv, na); + if (!sym) DIE(no_usym, "a subroutine"); - sym = SvPV(sv,na); if (op->op_private & HINT_STRICT_REFS) DIE(no_symref, sym, "a subroutine"); cv = perl_get_cv(sym, TRUE); |