Skip to content

Commit b8c2422

Browse files
committed
PRINCE: Fix syntax error in po-parse.pl
The `keys $var` form was removed in Perl 5.24. Replaced with the correct `keys %{$var}` form.
1 parent 77daf92 commit b8c2422

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

engines/prince/po-parse.pl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ ($)
136136

137137
print OUT "invtxt.dat\nitemNr. name - exam text\n";
138138

139-
for my $n (sort {$a<=>$b} keys $data1{'invtxt.txt'}) {
139+
for my $n (sort {$a<=>$b} keys %{$data1{'invtxt.txt'}}) {
140140
print OUT "$n. $data1{'invtxt.txt'}{$n}\n";
141141
}
142142

@@ -150,7 +150,7 @@ ($)
150150

151151
print OUT "variatxt.dat\nstringId. string\n";
152152

153-
for my $n (sort {$a<=>$b} keys $data1{'variatxt.txt'}) {
153+
for my $n (sort {$a<=>$b} keys %{$data1{'variatxt.txt'}}) {
154154
print OUT "$n. $data1{'variatxt.txt'}{$n}\n";
155155
}
156156

@@ -166,7 +166,7 @@ ($)
166166

167167
my $pn = 0;
168168

169-
for my $n (sort {$a<=>$b} keys $data1{'mob.lst'}) {
169+
for my $n (sort {$a<=>$b} keys %{$data1{'mob.lst'}}) {
170170
my $p1 = int($n / 1000);
171171

172172
if ($p1 != $pn) {
@@ -197,7 +197,7 @@ ($)
197197
for my $f (sort grep /^dialog/, keys %data1) {
198198
$f =~ /dialog(\d+)/;
199199
my $dialog = $1;
200-
my $hasDialog = !!grep { $_ > 100 } keys $data1{$f};
200+
my $hasDialog = !!grep { $_ > 100 } keys %{$data1{$f}};
201201

202202
if ($hasDialog) {
203203
print OUT "\@DIALOGBOX_LINES:\n";
@@ -208,7 +208,7 @@ ($)
208208
my $seenDialogBox = 0;
209209
my $prevBox = -1;
210210

211-
for my $n (sort {$a<=>$b} keys $data1{$f}) {
211+
for my $n (sort {$a<=>$b} keys %{$data1{$f}}) {
212212
my $s = $data1{$f}{$n};
213213
if ($n < 100) {
214214
while ($s =~ /^P#/) {

0 commit comments

Comments
 (0)