Previously it had custom code to change directory to the top of the source
tree, and to convert the library paths to absolute. TestInit has common code
for this.
# Verify that all files generated by perl scripts are up to date.
-my ($in_t, $lib);
-
BEGIN {
- $in_t = -f 'TEST' && -f '../regen.pl';
- $lib = $in_t ? '../lib' : 'lib';
- unshift @INC, $lib;
+ @INC = '..' if -f '../TestInit.pm';
}
-
+use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute
use strict;
-use File::Spec::Functions 'rel2abs';
-$^X = rel2abs($^X);
-$ENV{PERL5LIB} = rel2abs($lib);
-
-chdir '..' if $in_t;
-
-$INC[0] = 'lib';
require 'regen/regen_lib.pl';
require 't/test.pl';
$::NO_ENDING = $::NO_ENDING = 1;