summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/pp_hot.c b/pp_hot.c
index e2d9608ad8..a44ee34d9e 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -993,9 +993,12 @@ S_padhv_rv2hv_common(pTHX_ HV *hv, U8 gimme, bool is_keys, bool has_targ)
|| ( PL_op->op_private & OPpMAYBE_TRUEBOOL
&& block_gimme() == G_VOID)
)
- && !tied
- )
- PUSHs(HvUSEDKEYS(hv) ? &PL_sv_yes : &PL_sv_zero);
+ ) {
+ if (tied)
+ PUSHs(Perl_hv_scalar(aTHX_ hv));
+ else
+ PUSHs(HvUSEDKEYS(hv) ? &PL_sv_yes : &PL_sv_zero);
+ }
else if (gimme == G_SCALAR) {
if (is_keys) {
IV i;