C<lock>'s prototype has been corrected to C<(\[$@%*])> from C<(\$)>, which
was just wrong.
+=item *
+
+Most dereferencing operators (C<${}>, etc.) used to call C<FETCH> twice on
+a tied operand when doing a symbolic dereference (looking up a variable by
+name, which is not permitted under C<use strict 'refs'>). Only C<&{}> did
+not have this problem. This has been fixed.
+
=back
=head1 Known Problems
things. */
RETURN;
}
- sv = MUTABLE_SV(gv_fetchsv(sv, GV_ADD, SVt_PVGV));
+ {
+ STRLEN len;
+ const char * const nambeg = SvPV_nomg_const(sv, len);
+ sv = MUTABLE_SV(
+ gv_fetchpvn_flags(
+ nambeg, len, GV_ADD | SvUTF8(sv), SVt_PVGV
+ )
+ );
+ }
}
/* FAKE globs in the symbol table cause weird bugs (#77810) */
if (sv) SvFAKE_off(sv);
}
}
else {
- gv = gv_fetchsv(sv, GV_ADD, type);
+ STRLEN len;
+ const char * const nambeg = SvPV_nomg_const(sv, len);
+ gv = gv_fetchpvn_flags(nambeg, len, GV_ADD | SvUTF8(sv), type);
}
return gv;
}
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
- plan (tests => 210);
+ plan (tests => 215);
}
use strict;
tie my $var5 => 'main', sub {1};
$dummy = &$var5 ; check_count '&{}';
+{
+ no strict 'refs';
+ tie my $var1 => 'main', 1;
+ $dummy = $$var1 ; check_count 'symbolic ${}';
+ $dummy = @$var1 ; check_count 'symbolic @{}';
+ $dummy = %$var1 ; check_count 'symbolic %{}';
+ $dummy = *$var1 ; check_count 'symbolic *{}';
+ local *1 = sub{};
+ $dummy = &$var1 ; check_count 'symbolic &{}';
+}
###############################################
# Tests for $foo binop $foo #