diff options
author | Peter Harris <pharris@opentext.com> | 2014-03-18 11:08:42 -0400 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2014-03-21 14:31:50 -0400 |
commit | b3239d421fe35d4e397ed64e791ad53cb59482ac (patch) | |
tree | 893532597e72164b1738e8bdc8db83132882bd83 | |
parent | 655f422dbd5fbf845d6602a75f04185cd40f7a90 (diff) |
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 <peter.hutterer@who-t.net>
Signed-off-by: Peter Harris <pharris@opentext.com>
-rwxr-xr-x | xts5/bin/xts-config.in | 13 |
1 files 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; } |