@@ -257,14 +257,16 @@ sub mangle_plpython3
257
257
foreach my $test (@$tests )
258
258
{
259
259
local $/ = undef ;
260
- foreach my $dir (' sql' ,' expected' )
260
+ foreach my $dir (' sql' , ' expected' )
261
261
{
262
262
my $extension = ($dir eq ' sql' ? ' sql' : ' out' );
263
263
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 " );
265
266
foreach my $file (@files )
266
267
{
267
- open (my $handle , ' <' , $file ) || die " test file $file not found" ;
268
+ open (my $handle , ' <' , $file )
269
+ || die " test file $file not found" ;
268
270
my $contents = <$handle >;
269
271
close ($handle );
270
272
do
@@ -279,16 +281,18 @@ sub mangle_plpython3
279
281
s / LANGUAGE plpython2?u/ LANGUAGE plpython3u/ g ;
280
282
s / EXTENSION ([^ ]*_)*plpython2?u/ EXTENSION $1plpython3u/ g ;
281
283
s / installing required extension "plpython2u"/ installing required extension "plpython3u"/ g ;
282
- } for ($contents );
284
+ }
285
+ for ($contents );
283
286
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 " ;
286
289
print $handle $contents ;
287
290
close ($handle );
288
291
}
289
292
}
290
293
}
291
- do { s ! ^! python3/! ; } foreach (@$tests );
294
+ do { s ! ^! python3/! ; }
295
+ foreach (@$tests );
292
296
return @$tests ;
293
297
}
294
298
@@ -314,8 +318,9 @@ sub plcheck
314
318
}
315
319
if ($lang eq ' plpython' )
316
320
{
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" ;
319
324
$lang = ' plpythonu' ;
320
325
}
321
326
else
@@ -326,7 +331,7 @@ sub plcheck
326
331
chdir $dir ;
327
332
my @tests = fetchTests();
328
333
@tests = mangle_plpython3(\@tests )
329
- if $lang eq ' plpythonu' && -d " $topdir /$Config /plpython3" ;
334
+ if $lang eq ' plpythonu' && -d " $topdir /$Config /plpython3" ;
330
335
if ($lang eq ' plperl' )
331
336
{
332
337
@@ -380,7 +385,7 @@ sub subdircheck
380
385
# Special processing for python transform modules, see their respective
381
386
# Makefiles for more details regarding Python-version specific
382
387
# dependencies.
383
- if ( $module =~ / _plpython$ / )
388
+ if ($module =~ / _plpython$ / )
384
389
{
385
390
die " Python not enabled in configuration"
386
391
if !defined ($config -> {python });
@@ -405,7 +410,7 @@ sub subdircheck
405
410
" $topdir /$Config /pg_regress/pg_regress" ,
406
411
" --bindir=${topdir} /${Config} /psql" ,
407
412
" --dbname=contrib_regression" , @opts , @tests );
408
- print join (' ' ,@args )," \n " ;
413
+ print join (' ' , @args ), " \n " ;
409
414
system (@args );
410
415
chdir " .." ;
411
416
}
@@ -417,11 +422,11 @@ sub contribcheck
417
422
foreach my $module (glob (" *" ))
418
423
{
419
424
# 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 }));
425
430
next if ($module eq " sepgsql" );
426
431
427
432
subdircheck($module );
0 commit comments