From d6b1f1a1b2acfc700075536fd996b371cfc5d89a Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 24 Sep 2013 06:35:51 +0200 Subject: [PATCH] =?utf8?q?i3test:=20get=20rid=20of=20the=20smartmatch=20op?= =?utf8?q?erator,=20it=E2=80=99s=20experimental=20since=20perl=205.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- testcases/lib/i3test.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/lib/i3test.pm b/testcases/lib/i3test.pm index 9f3a6ea2..476cda03 100644 --- a/testcases/lib/i3test.pm +++ b/testcases/lib/i3test.pm @@ -406,7 +406,7 @@ C which directly switches to an unused workspace. sub get_unused_workspace { my @names = get_workspace_names(); my $tmp; - do { $tmp = tmpnam() } while ($tmp ~~ @names); + do { $tmp = tmpnam() } while ((scalar grep { $_ eq $tmp } @names) > 0); $tmp } @@ -626,7 +626,7 @@ Returns true if C<$workspace> is the name of an existing workspace. =cut sub workspace_exists { my ($name) = @_; - ($name ~~ @{get_workspace_names()}) + (scalar grep { $_ eq $name } @{get_workspace_names()}) > 0; } =head2 focused_ws -- 2.39.5