--- 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);