From: Michael Stapelberg Date: Tue, 24 Sep 2013 04:35:51 +0000 (+0200) Subject: i3test: get rid of the smartmatch operator, it’s experimental since perl 5.18 X-Git-Tag: 4.7~59 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d6b1f1a1b2acfc700075536fd996b371cfc5d89a;p=i3%2Fi3 i3test: get rid of the smartmatch operator, it’s experimental since perl 5.18 --- 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