Subject: | prove -b is iniconsistent with perl -Mblib |
When running `prove -b ...` blib dirs are not added @INC the way they
are in the blib.pm module. The blib.pm module "searches" for the blib
in up to 5 parent directories. This is handy when blib/ and t/ are not
in the same directory.
I tried to workaround this using `prove -Mblib ...` but it appears that
the changes blib.pm makes to @INC are not propagated across the fork()
that prove does.
App::Prove.pm:
530 if ( $self->blib ) {
531 push @libs, 'blib/lib', 'blib/arch';
532 }
blib.pm:
70 my $i = 5;
71 my($blib, $blib_lib, $blib_arch);
72 while ($i--)
73 {
74 $blib = File::Spec->catdir($dir, "blib");
75 $blib_lib = File::Spec->catdir($blib, "lib");
76
77 if ($^O eq 'MacOS')
78 {
79 $blib_arch = File::Spec->catdir($blib_lib, $MacPerl::Architecture);
80 }
81 else
82 {
83 $blib_arch = File::Spec->catdir($blib, "arch");
84 }
85
86 if (-d $blib && -d $blib_arch && -d $blib_lib)
87 {
88 unshift(@INC,$blib_arch,$blib_lib);
89 warn "Using $blib\n" if $Verbose;
90 return;
91 }
92 $dir = File::Spec->catdir($dir, File::Spec->updir);
93 }