This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
B::MAGIC::LENGTH(), not B::MAGIC::LEN(). Fixes #78864
[perl5.git] / TestInit.pm
index 7eec5b4..8513955 100644 (file)
@@ -59,7 +59,7 @@ if (-f 't/TEST' && -f 'MANIFEST' && -d 'lib' && -d 'ext') {
     # We're being run from the top level. Try to change directory, and set
     # things up correctly. This is a 90% solution, but for hand-running tests,
     # that's good enough
-    if ($0 =~ s!^((?:ext|cpan)[\\/][^\\/]+)[\//](.*\.t)$!$2!) {
+    if ($0 =~ s!^((?:ext|dist|cpan)[\\/][^\\/]+)[\//](.*\.t)$!$2!) {
        # Looks like a test in ext.
        chdir $1 or die "Can't chdir '$1': $!";
        new_inc(@up_2_t);