This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d17b0a
)
Fix sub call through magic var (e.g. C<&$1>)
author
Chip Salzenberg
<chip@perl.com>
Mon, 10 Feb 1997 22:11:59 +0000
(10:11 +1200)
committer
Chip Salzenberg
<chip@atlantic.net>
Tue, 18 Feb 1997 01:22:00 +0000
(13:22 +1200)
pp_hot.c
patch
|
blob
|
blame
|
history
diff --git
a/pp_hot.c
b/pp_hot.c
index
16c2505
..
44981b7
100644
(file)
--- a/
pp_hot.c
+++ b/
pp_hot.c
@@
-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);