@@ -261,10 +261,10 @@ sub mangle_plpython3
261
261
my @files =glob (" $dir /$test .$extension $dir /${test} _[0-9].$extension " );
262
262
foreach my $file (@files )
263
263
{
264
- open (my $handle ," $file " ) ||die " test file$file not found" ;
264
+ open (my $handle ,' < ' , $file ) ||die " test file$file not found" ;
265
265
my $contents = <$handle >;
266
266
close ($handle );
267
- map
267
+ do
268
268
{
269
269
s / except ([[:alpha:]][[:alpha:].]*), *([[:alpha:]][[:alpha:]]*):/ except$1 as$2 :/ g ;
270
270
s / <type 'exceptions\. ([[:alpha:]]*)'>/ <class '$1 '>/ g ;
@@ -276,15 +276,16 @@ sub mangle_plpython3
276
276
s / LANGUAGE plpython2?u/ LANGUAGE plpython3u/ g ;
277
277
s / EXTENSION ([^ ]*_)*plpython2?u/ EXTENSION $1plpython3u/ g ;
278
278
s / installing required extension "plpython2u"/ installing required extension "plpython3u"/ g ;
279
- }$contents ;
279
+ }for ( $contents ) ;
280
280
my $base = basename$file ;
281
- open ($handle ," >$dir /python3/$base " ) ||die " opening python 3 file for$file " ;
281
+ open ($handle ,' >' ," $dir /python3/$base " ) ||
282
+ die " opening python 3 file for$file " ;
282
283
print $handle $contents ;
283
284
close ($handle );
284
285
}
285
286
}
286
287
}
287
- map {$_ =~ s ! ^! python3/! ; }@$tests ;
288
+ do {s ! ^! python3/! ; }foreach ( @$tests ) ;
288
289
return @$tests ;
289
290
}
290
291