[Boris, in the future please post all the questions regarding A::T to this list, as it's not my personal project. Thanks.]

Boris Zentner wrote:
Hi Stas,

I would like to release something that should use A::T but dire need to install/use/test the content from blib NOT from lib.

I can not find a good solution for this and here is the ugliest part ever from my t/TEST.PL.

Please advice me a better way, if you know one.

Yes, yes, I'm going to work on this asap (hopefuly the first few days of the next week), unless someone beats me to it.


We discussed with Boris offline that we want to change the current behavior of A::T, where it puts lib/ as the first entry in @INC. We agreed to have a special maintainer mode (Env var/option) which will turn on the current behavior, and by default blib/ dirs are to be first in @INC.

thanks

##################### TEST.PL #####################
#!perl
use FindBin;

# it is not enough to set only PERL5LIB then blib/lib is tested after lib
$ENV{PERL5LIB} = "$FindBin::Bin/../blib/lib";

package My::TestRun;
use base 'Apache::TestRun';
use Apache::TestConfig;
sub Apache::TestConfig::add_inc {
my $self = shift;
return if $ENV{MOD_PERL}; #already setup by mod_perl
require lib;
# we need blib/lib before lib -- what sense has blib else??? lib::->import(map "$self->{vars}->{top_dir}/$_",
qw(blib/lib blib/arch lib ));
}


1;
package main;

# do more

My::TestRun->new->run(@ARGV);



--


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to