i3test: get rid of the smartmatch operator, it’s experimental since perl 5.18

This commit is contained in:
Michael Stapelberg 2013-09-24 06:35:51 +02:00
parent 5d005f403c
commit d6b1f1a1b2
1 changed files with 2 additions and 2 deletions

View File

@ -406,7 +406,7 @@ C<fresh_workspace> 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