|| cSVOPo->op_sv == &PL_sv_no)
return TRUE;
+ else
+ return FALSE;
+ case OP_FLOP:
+ /* Detect "..." flip-flop operator */
+ if (cUNOPo->op_first->op_flags & OPf_SPECIAL)
+ return TRUE;
+
/* FALL THROUGH */
default:
return FALSE;
use strict;
use warnings;
-use Test::More tests => 109;
+use Test::More tests => 113;
# The behaviour of the feature pragma should be tested by lib/switch.t
# using the tests in t/lib/switch/*. This file tests the behaviour of
}
{
+ my $n = 0;
+ for my $l qw(a b c d) {
+ given ($l) {
+ when ($_ eq "b" ... $_ eq "c") { $n = 1 }
+ default { $n = 0 }
+ }
+ ok(($n xor $l =~ /[ad]/), 'when(E1...E2) evaluates in boolean context');
+ }
+}
+
+{
my $ok = 0;
given("foo") {
when((1 == $ok) || "foo") {