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