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