stas        2003/06/01 20:03:39

  Modified:    t/conf   modperl_extra.pl
  Log:
  after Apache2 has pushed blib and core dirs including Apache2 on top
  reorg @INC to have first devel libs, then blib libs, and only then
  perl core libs
  
  Revision  Changes    Path
  1.30      +21 -2     modperl-2.0/t/conf/modperl_extra.pl
  
  Index: modperl_extra.pl
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- modperl_extra.pl  14 May 2003 02:26:53 -0000      1.29
  +++ modperl_extra.pl  2 Jun 2003 03:03:39 -0000       1.30
  @@ -1,16 +1,35 @@
   use Socket (); #test DynaLoader vs. XSLoader workaround for 5.6.x
   use IO::File ();
  +use File::Spec::Functions qw(canonpath);
   
   use Apache2 ();
   
  +use Apache::Server ();
  +use Apache::ServerUtil ();
  +use Apache::Process ();
  +
  +# after Apache2 has pushed blib and core dirs including Apache2 on top
  +# reorg @INC to have first devel libs, then blib libs, and only then
  +# perl core libs
  +my $pool = Apache->server->process->pool;
  +my $project_root = canonpath Apache::server_root_relative($pool, "..");
  +my (@a, @b, @c);
  +for (@INC) {
  +    if (m|^$project_root|) {
  +        m|blib| ? push @b, $_ : push @a, $_;
  +    }
  +    else {
  +        push @c, $_;
  +    }
  +}
  [EMAIL PROTECTED] = (@a, @b, @c);
  +
   use ModPerl::Util (); #for CORE::GLOBAL::exit
   
   use Apache::RequestRec ();
   use Apache::RequestIO ();
   use Apache::RequestUtil ();
   
  -use Apache::Server ();
  -use Apache::ServerUtil ();
   use Apache::Connection ();
   use Apache::Log ();
   
  
  
  

Reply via email to