@@ -262,10 +262,10 @@ sub mangle_plpython3
262262my @files =glob (" $dir /$test .$extension $dir /${test} _[0-9].$extension " );
263263foreach my $file (@files )
264264{
265- open (my $handle ," $file " ) ||die " test file$file not found" ;
265+ open (my $handle ,' < ' , $file ) ||die " test file$file not found" ;
266266my $contents = <$handle >;
267267close ($handle );
268- map
268+ do
269269{
270270s / except ([[:alpha:]][[:alpha:].]*), *([[:alpha:]][[:alpha:]]*):/ except$1 as$2 :/ g ;
271271s / <type 'exceptions\. ([[:alpha:]]*)'>/ <class '$1 '>/ g ;
@@ -277,15 +277,16 @@ sub mangle_plpython3
277277s / LANGUAGE plpython2?u/ LANGUAGE plpython3u/ g ;
278278s / EXTENSION ([^ ]*_)*plpython2?u/ EXTENSION $1plpython3u/ g ;
279279s / installing required extension "plpython2u"/ installing required extension "plpython3u"/ g ;
280- }$contents ;
280+ }for ( $contents ) ;
281281my $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 " ;
283284print $handle $contents ;
284285close ($handle );
285286}
286287}
287288}
288- map {$_ =~ s ! ^! python3/! ; }@$tests ;
289+ do {s ! ^! python3/! ; }foreach ( @$tests ) ;
289290return @$tests ;
290291}
291292