diff options
author | Yitzchak Scott-Thoennes <sthoenna@efn.org> | 2003-05-07 08:27:07 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-05-08 18:12:46 +0000 |
commit | 126c71c82576d5dc652db25ca9e3f8e18442c4fd (patch) | |
tree | e2790a78faaa94be96e8fcce8035cddddae1602e /pp.c | |
parent | 86e5a81e88dbe10bf1c195d6ca6fefab8bfafc17 (diff) | |
download | perl-126c71c82576d5dc652db25ca9e3f8e18442c4fd.tar.gz |
Re: [perl #17718] %tiedhash in bool context doesn't check if hash is empty
Message-ID: <7gYu+gzkgaFU092yn@efn.org>
p4raw-id: //depot/perl@19452
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -107,6 +107,9 @@ PP(pp_padhv) } else if (gimme == G_SCALAR) { SV* sv = sv_newmortal(); + if (SvRMAGICAL(TARG) && mg_find(TARG, PERL_MAGIC_tied)) + Perl_croak(aTHX_ "Can't provide tied hash usage; " + "use keys(%%hash) to test if empty"); if (HvFILL((HV*)TARG)) Perl_sv_setpvf(aTHX_ sv, "%ld/%ld", (long)HvFILL((HV*)TARG), (long)HvMAX((HV*)TARG) + 1); |