File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -258,10 +258,10 @@ sub mangle_plpython3
258
258
my @files = glob (" $dir /$test .$extension $dir /${test} _[0-9].$extension " );
259
259
foreach my $file (@files )
260
260
{
261
- open (my $handle , " $file " ) || die " test file $file not found" ;
261
+ open (my $handle , ' < ' , $file ) || die " test file $file not found" ;
262
262
my $contents = <$handle >;
263
263
close ($handle );
264
- map
264
+ do
265
265
{
266
266
s / except ([[:alpha:]][[:alpha:].]*), *([[:alpha:]][[:alpha:]]*):/ except $1 as $2 :/ g ;
267
267
s / <type 'exceptions\. ([[:alpha:]]*)'>/ <class '$1 '>/ g ;
@@ -273,15 +273,16 @@ sub mangle_plpython3
273
273
s / LANGUAGE plpython2?u/ LANGUAGE plpython3u/ g ;
274
274
s / EXTENSION ([^ ]*_)*plpython2?u/ EXTENSION $1plpython3u/ g ;
275
275
s / installing required extension "plpython2u"/ installing required extension "plpython3u"/ g ;
276
- } $contents ;
276
+ } for ( $contents ) ;
277
277
my $base = basename $file ;
278
- open ($handle , " >$dir /python3/$base " ) || die " opening python 3 file for $file " ;
278
+ open ($handle , ' >' , " $dir /python3/$base " ) ||
279
+ die " opening python 3 file for $file " ;
279
280
print $handle $contents ;
280
281
close ($handle );
281
282
}
282
283
}
283
284
}
284
- map { $_ =~ s ! ^! python3/! ; } @$tests ;
285
+ do { s ! ^! python3/! ; } foreach ( @$tests ) ;
285
286
return @$tests ;
286
287
}
287
288
You can’t perform that action at this time.
0 commit comments