You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2002/05/14 19:12:02 UTC

cvs commit: modperl-2.0/ModPerl-Registry/t/conf modperl_extra_startup.pl

stas        02/05/14 10:12:01

  Modified:    ModPerl-Registry/t/conf modperl_extra_startup.pl
  Log:
  registry loader is a bit broken, disable the loading at the startup for
  now
  
  Revision  Changes    Path
  1.2       +38 -32    modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl
  
  Index: modperl_extra_startup.pl
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_extra_startup.pl	13 Nov 2001 04:33:06 -0000	1.1
  +++ modperl_extra_startup.pl	14 May 2002 17:12:01 -0000	1.2
  @@ -1,41 +1,47 @@
   # 
  -
   use strict;
  -use warnings;
  +use warnings FATAL => 'all';
  +
  +# XXX: this should go
  +use Apache::compat;
   
  +use Apache::ServerUtil;
  +use Apache::Process;
  +use APR::Pool;
   # test the scripts pre-loading by explicitly specifying uri => filename
   use ModPerl::RegistryLoader ();
   my $rl = ModPerl::RegistryLoader->new(package => "ModPerl::Registry");
  -my $base_dir = Apache::server_root_relative("cgi-bin");
  +
  +my $pool = Apache->server->process->pool;
  +my $base_dir = Apache::server_root_relative($pool, "cgi-bin");
   my $base_uri = "/cgi-bin";
  -for my $file (qw(basic.pl env.pl)) {
  -    my $file_path  = "$base_dir/$file";
  -    my $info_path  = "$base_uri/$file";
  -    $rl->handler($info_path, $file_path);
  -}
  -
  -{
  -    # test the scripts pre-loading by using trans sub
  -    use ModPerl::RegistryLoader ();
  -    use DirHandle ();
  -    use strict;
  -
  -    my $dir = Apache::server_root_relative("cgi-bin");
  -
  -    sub trans {
  -        my $uri = shift; 
  -        $uri =~ s|^/registry_bb/|cgi-bin/|;
  -        return Apache::server_root_relative($uri);
  -    }
  -
  -    my $rl = ModPerl::RegistryLoader->new(package => "ModPerl::RegistryBB",
  -                                          trans   => \&trans);
  -    my $dh = DirHandle->new($dir) or die $!;
  -
  -    for my $file ($dh->read) {
  -        next unless $file =~ /\.pl$/;
  -        $rl->handler("/registry_bb/$file");
  -    }
  -}
  +#for my $file (qw(basic.pl env.pl)) {
  +#    my $file_path  = "$base_dir/$file";
  +#    my $info_path  = "$base_uri/$file";
  +#    $rl->handler($info_path, $file_path);
  +#}
  +
  +#{
  +#    # test the scripts pre-loading by using trans sub
  +#    use DirHandle ();
  +#    use strict;
  +
  +#    sub trans {
  +#        my $uri = shift; 
  +#        $uri =~ s|^/registry_bb/|cgi-bin/|;
  +#        return Apache::server_root_relative($pool, $uri);
  +#    }
  +
  +#    my $dir = Apache::server_root_relative($pool, "cgi-bin");
  +
  +#    my $rl = ModPerl::RegistryLoader->new(package => "ModPerl::RegistryBB",
  +#                                          trans   => \&trans);
  +#    my $dh = DirHandle->new($dir) or die $!;
  +
  +#    for my $file ($dh->read) {
  +#        next unless $file =~ /\.pl$/;
  +#        $rl->handler("/registry_bb/$file");
  +#    }
  +#}
   
   1;