From b3239d421fe35d4e397ed64e791ad53cb59482ac Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Tue, 18 Mar 2014 11:08:42 -0400 Subject: Drop use of perl's given/when construct The perl mongers have retroactively marked this construct "experimental", five and a half years after it was marked stable. http://perldoc.perl.org/perl5180delta.html#The-smartmatch-family-of-features-are-now-experimental Acked-by: Peter Hutterer Signed-off-by: Peter Harris --- xts5/bin/xts-config.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xts5/bin/xts-config.in b/xts5/bin/xts-config.in index dbe84dad..2dbe653a 100755 --- a/xts5/bin/xts-config.in +++ b/xts5/bin/xts-config.in @@ -1,6 +1,5 @@ #!/usr/bin/perl -pi.bak -use 5.10.0; use warnings; use strict; use Sys::Hostname; @@ -136,10 +135,16 @@ BEGIN $::vars{"XT_PIXMAP_DEPTHS"} =~ s/,?\s+/ /g; - given ($::vars{XT_DOES_BACKING_STORE}) + if ($::vars{XT_DOES_BACKING_STORE} =~ /yes/i) + { + $::vars{XT_DOES_BACKING_STORE} = 2; + } + elsif ($::vars{XT_DOES_BACKING_STORE} =~ /no/i) + { + $::vars{XT_DOES_BACKING_STORE} = 1; + } + else { - $::vars{XT_DOES_BACKING_STORE} = 2 when (/yes/i); - $::vars{XT_DOES_BACKING_STORE} = 1 when (/when/i); $::vars{XT_DOES_BACKING_STORE} = 0; } -- cgit v1.2.3