Commit | Line | Data |
4343e7c3 |
1 | # This is a replacement for the old BEGIN preamble which heads (or |
db7c4376 |
2 | # should head) up every core test program to prepare it for running. |
4343e7c3 |
3 | # Now instead of: |
4 | # |
5 | # BEGIN { |
6 | # chdir 't' if -d 't'; |
7 | # @INC = '../lib'; |
8 | # } |
9 | # |
db7c4376 |
10 | # t/TEST will use -MTestInit. You may "use TestInit" in the test |
11 | # programs but it is not required. |
4343e7c3 |
12 | # |
db7c4376 |
13 | # P.S. This documentation is not in POD format in order to avoid |
14 | # problems when there are fundamental bugs in perl. |
4343e7c3 |
15 | |
18fc9488 |
16 | package TestInit; |
17 | |
2af1ab88 |
18 | $VERSION = 1.01; |
19 | |
4343e7c3 |
20 | chdir 't' if -d 't'; |
680ed74d |
21 | if ($^O eq 'VMS') { |
22 | require File::Spec; |
23 | @INC = File::Spec->rel2abs('[-.lib]'); |
24 | } |
25 | else { |
26 | @INC = '../lib'; |
27 | } |
a1910616 |
28 | |
29 | # Don't interfere with the taintedness of %ENV, this could perturbate tests |
30 | $ENV{PERL_CORE} = 1 unless ${^TAINT}; |
31 | |
7a315204 |
32 | $0 =~ s/\.dp$//; # for the test.deparse make target |
ec5f1610 |
33 | 1; |
34 | |