This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add an import option 'T' to TestInit, for tests that run at the top level.
[perl5.git] / TestInit.pm
index 88c3ba1..c921686 100644 (file)
@@ -69,6 +69,11 @@ sub import {
            delete $ENV{PERL_CORE}
        } elsif ($_ eq 'A') {
            $abs = 1;
+       } elsif ($_ eq 'T') {
+           $chdir = '..'
+               unless -f 't/TEST' && -f 'MANIFEST' && -d 'lib' && -d 'ext';
+           @new_inc = 'lib';
+           $setopt = 1;
        } else {
            die "Unknown option '$_'";
        }