From: Rafael Garcia-Suarez Date: Thu, 30 Oct 2008 11:29:50 +0000 (+0000) Subject: The file test operators -s, -A, -C and -M can return false values X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d724f706d60f9fb8d712cd22b9ec95e343d5ee28;p=p5sagit%2Fp5-mst-13.2.git The file test operators -s, -A, -C and -M can return false values that are not undef or "no". Take that into account when stacking them. This fixes bug #60214. p4raw-id: //depot/perl@34660 --- diff --git a/pp_sys.c b/pp_sys.c index 0181e7e..6bc84d9 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -2940,7 +2940,7 @@ PP(pp_stat) * Else, discard it from the stack and continue. --rgs */ #define STACKED_FTEST_CHECK if (PL_op->op_private & OPpFT_STACKED) { \ - if (TOPs == &PL_sv_no || TOPs == &PL_sv_undef) { RETURN; } \ + if (!SvTRUE(TOPs)) { RETURN; } \ else { (void)POPs; PUTBACK; } \ }