summaryrefslogtreecommitdiff
path: root/extra/libwebkit/replace-switch-with-given-when.patch
blob: 4e64610bbb5ffd81e0f712f46edb200446bd3cb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff -upr webkit-1.4.0.orig/Source/WebCore/make-hash-tools.pl webkit-1.4.0/Source/WebCore/make-hash-tools.pl
--- webkit-1.4.0.orig/Source/WebCore/make-hash-tools.pl	2011-04-25 22:27:15.000000000 +0300
+++ webkit-1.4.0/Source/WebCore/make-hash-tools.pl	2011-06-02 00:41:26.000000000 +0300
@@ -20,7 +20,7 @@
 #   Boston, MA 02110-1301, USA.
 
 use strict;
-use Switch;
+use feature 'switch';
 use File::Basename;
 
 my $outdir = $ARGV[0];
@@ -28,9 +28,9 @@ shift;
 my $option = basename($ARGV[0],".gperf");
 
 
-switch ($option) {
+given ($option) {
 
-case "DocTypeStrings" {
+when ("DocTypeStrings") {
 
     my $docTypeStringsGenerated    = "$outdir/DocTypeStrings.cpp";
     my $docTypeStringsGperf        = $ARGV[0];
@@ -38,9 +38,9 @@ case "DocTypeStrings" {
 
     system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?";
 
-} # case "DocTypeStrings"
+} # when ("DocTypeStrings")
 
-case "ColorData" {
+when ("ColorData") {
 
     my $colorDataGenerated         = "$outdir/ColorData.cpp";
     my $colorDataGperf             = $ARGV[0];
@@ -48,6 +48,6 @@ case "ColorData" {
 
     system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?";
 
-} # case "ColorData"
+} # when ("ColorData")
 
-} # switch ($option)
+} # given ($option)