diff options
-rw-r--r-- | pp.c | 10 | ||||
-rw-r--r-- | t/op/tie_fetch_count.t | 7 |
2 files changed, 14 insertions, 3 deletions
@@ -286,10 +286,16 @@ Perl_softref2xv(pTHX_ SV *const sv, const char *const what, if ((PL_op->op_flags & OPf_SPECIAL) && !(PL_op->op_flags & OPf_MOD)) { - gv = gv_fetchsv(sv, 0, type); + STRLEN len; + const char * const nambeg = SvPV_nomg_const(sv, len); + gv = gv_fetchpvn_flags(nambeg, len, SvUTF8(sv), type); if (!gv && (!is_gv_magical_sv(sv,0) - || !(gv = gv_fetchsv(sv, GV_ADD, type)))) + || !(gv = gv_fetchpvn_flags( + nambeg, len, GV_ADD|SvUTF8(sv), type + )) + ) + ) { **spp = &PL_sv_undef; return NULL; diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t index b6c4d6ad40..426addbb1a 100644 --- a/t/op/tie_fetch_count.t +++ b/t/op/tie_fetch_count.t @@ -7,7 +7,7 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require './test.pl'; - plan (tests => 216); + plan (tests => 217); } use strict; @@ -195,6 +195,11 @@ $dummy = &$var5 ; check_count '&{}'; tie my $var6 => main => "\cOPEN"; no warnings; readdir $var6 ; check_count 'symbolic readdir'; + if (exists $::{973}) { # Need a different variable here + die "*973 already exists. Please adjust this test" + } + tie my $var7 => main => 973; + defined $$var7 ; check_count 'symbolic defined ${}'; } ############################################### |