@@ -257,14 +257,16 @@ sub mangle_plpython3
257257 foreach my $test (@$tests )
258258 {
259259 local $/ = undef ;
260- foreach my $dir (' sql' ,' expected' )
260+ foreach my $dir (' sql' , ' expected' )
261261 {
262262 my $extension = ($dir eq ' sql' ? ' sql' : ' out' );
263263
264- my @files = glob (" $dir /$test .$extension $dir /${test} _[0-9].$extension " );
264+ my @files =
265+ glob (" $dir /$test .$extension $dir /${test} _[0-9].$extension " );
265266 foreach my $file (@files )
266267 {
267- open (my $handle , ' <' , $file ) || die " test file $file not found" ;
268+ open (my $handle , ' <' , $file )
269+ || die " test file $file not found" ;
268270 my $contents = <$handle >;
269271 close ($handle );
270272 do
@@ -279,16 +281,18 @@ sub mangle_plpython3
279281 s / LANGUAGE plpython2?u/ LANGUAGE plpython3u/ g ;
280282 s / EXTENSION ([^ ]*_)*plpython2?u/ EXTENSION $1plpython3u/ g ;
281283 s / installing required extension "plpython2u"/ installing required extension "plpython3u"/ g ;
282- } for ($contents );
284+ }
285+ for ($contents );
283286 my $base = basename $file ;
284- open ($handle , ' >' , " $dir /python3/$base " ) ||
285- die " opening python 3 file for $file " ;
287+ open ($handle , ' >' , " $dir /python3/$base " )
288+ || die " opening python 3 file for $file " ;
286289 print $handle $contents ;
287290 close ($handle );
288291 }
289292 }
290293 }
291- do { s ! ^! python3/! ; } foreach (@$tests );
294+ do { s ! ^! python3/! ; }
295+ foreach (@$tests );
292296 return @$tests ;
293297}
294298
@@ -314,8 +318,9 @@ sub plcheck
314318 }
315319 if ($lang eq ' plpython' )
316320 {
317- next unless -d " $topdir /$Config /plpython2" ||
318- -d " $topdir /$Config /plpython3" ;
321+ next
322+ unless -d " $topdir /$Config /plpython2"
323+ || -d " $topdir /$Config /plpython3" ;
319324 $lang = ' plpythonu' ;
320325 }
321326 else
@@ -326,7 +331,7 @@ sub plcheck
326331 chdir $dir ;
327332 my @tests = fetchTests();
328333 @tests = mangle_plpython3(\@tests )
329- if $lang eq ' plpythonu' && -d " $topdir /$Config /plpython3" ;
334+ if $lang eq ' plpythonu' && -d " $topdir /$Config /plpython3" ;
330335 if ($lang eq ' plperl' )
331336 {
332337
@@ -380,7 +385,7 @@ sub subdircheck
380385 # Special processing for python transform modules, see their respective
381386 # Makefiles for more details regarding Python-version specific
382387 # dependencies.
383- if ( $module =~ / _plpython$ / )
388+ if ($module =~ / _plpython$ / )
384389 {
385390 die " Python not enabled in configuration"
386391 if !defined ($config -> {python });
@@ -405,7 +410,7 @@ sub subdircheck
405410 " $topdir /$Config /pg_regress/pg_regress" ,
406411 " --bindir=${topdir} /${Config} /psql" ,
407412 " --dbname=contrib_regression" , @opts , @tests );
408- print join (' ' ,@args )," \n " ;
413+ print join (' ' , @args ), " \n " ;
409414 system (@args );
410415 chdir " .." ;
411416}
@@ -417,11 +422,11 @@ sub contribcheck
417422 foreach my $module (glob (" *" ))
418423 {
419424 # these configuration-based exclusions must match Install.pm
420- next if ($module eq " uuid-ossp" && !defined ($config -> {uuid }));
421- next if ($module eq " sslinfo" && !defined ($config -> {openssl }));
422- next if ($module eq " xml2" && !defined ($config -> {xml }));
423- next if ($module =~ / _plperl$ / && !defined ($config -> {perl }));
424- next if ($module =~ / _plpython$ / && !defined ($config -> {python }));
425+ next if ($module eq " uuid-ossp" && !defined ($config -> {uuid }));
426+ next if ($module eq " sslinfo" && !defined ($config -> {openssl }));
427+ next if ($module eq " xml2" && !defined ($config -> {xml }));
428+ next if ($module =~ / _plperl$ / && !defined ($config -> {perl }));
429+ next if ($module =~ / _plpython$ / && !defined ($config -> {python }));
425430 next if ($module eq " sepgsql" );
426431
427432 subdircheck($module );
0 commit comments