diff options
author | Zefram <zefram@fysh.org> | 2020-02-05 07:43:14 +0000 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-03-12 22:34:26 -0600 |
commit | 02b85d3dab092d678cfc958a2dc252405333ed25 (patch) | |
tree | 106c8bfafd35b0d496133efad370973e7f2988d9 /pp.c | |
parent | aa4119bb5f3a35b89e89d3504835f8da0d933e3d (diff) | |
download | perl-02b85d3dab092d678cfc958a2dc252405333ed25.tar.gz |
chained comparisons
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -7130,6 +7130,30 @@ PP(pp_isa) RETURN; } +PP(pp_cmpchain_and) +{ + dSP; + SV *result = POPs; + PUTBACK; + if (SvTRUE_NN(result)) { + return cLOGOP->op_other; + } else { + TOPs = result; + return NORMAL; + } +} + +PP(pp_cmpchain_dup) +{ + dSP; + SV *right = TOPs; + SV *left = TOPm1s; + TOPm1s = right; + TOPs = left; + XPUSHs(right); + RETURN; +} + /* * ex: set ts=8 sts=4 sw=4 et: */ |