summaryrefslogtreecommitdiff
path: root/textproc/po4a/files/patch-perl5.10
blob: b9bbda459261baeb70ca02720b5750821d592d05 (plain) (blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- po4a
+++ po4a
@@ -440,10 +440,10 @@
     $opts{"msgmerge-opt"} .= " --previous" if $previous;
 
     # options to transmit to the modules
-    %{$opts{"options"}} = (
+    $opts{"options"} = {
         "verbose" => $opts{"verbose"},
         "debug"   => $opts{"debug"}
-    );
+    };
     foreach (@options) {
         if (m/^([^=]*)=(.*)$/) {
             $opts{"options"}{$1}="$2";
@@ -498,10 +498,10 @@
             if (! defined $lang) {
                 $lang = "global";
             }
-            if (! defined ${%$options}{$lang}) {
-                ${%$options}{$lang} = $opt;
+            if (! defined $options->{$lang}) {
+                $options->{$lang} = $opt;
             } else {
-                ${%$options}{$lang} .= " $opt";
+                $options->{$lang} .= " $opt";
             }
         } else {
             last;
@@ -638,20 +638,20 @@
 	my %options;
 	# 1. Use the global options ([opt] ...)
 	%options = %{$document{''}{'options'}}
-	  if defined %{$document{''}{'options'}};
+	  if defined $document{''}{'options'};
 
 	# 2. Merge the alias options
 	if (defined $aliases{$1}) {
 	    $document{$main}{'format'} = $aliases{$1}{"module"};
-	    if (defined %{$aliases{$1}{"options"}}) {
-		%options = %{$aliases{$1}{"options"}};
+	    if (defined $aliases{$1}{"options"}) {
+		%options = %{$aliases{$1}{"options"}}; # XXX not a merge, but overwrite
 	    }
 	}
 
 	# 3. If this file was already specified, reuse the previous
 	#    options (no merge)
 	%options = %{$document{$main}{'options'}}
-	  if defined %{$document{$main}{'options'}};
+	  if defined $document{$main}{'options'};
 
 	# 4. Merge the document specific options
 	# separate the end of the line, which contains options.
@@ -697,7 +697,7 @@
 	$o =~ s/.*?\[options\] +//;
 	parse_config_options("$config_file:$nb",
 	                     $o,
-	                     \%{$document{''}{"options"}});
+	                     $document{''}{"options"});
     } else {
 	die wrap_ref_mod("$config_file:$nb", "",
 	    gettext("Unparsable command '%s'."), $cmd);