File: rl.pl

package info (click to toggle)
libapache-mod-perl 1.16-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,580 kB
  • ctags: 1,064
  • sloc: ansic: 4,489; perl: 4,415; sh: 305; makefile: 137
file content (27 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#test Apache::RegistryLoader

{
    use Apache::RegistryLoader ();
    use DirHandle ();
    use strict;
    
    my $rl = Apache::RegistryLoader->new(trans => sub {
	my $uri = shift; 
	$Apache::Server::CWD."/t/net${uri}";
    });

    my $path = Apache->server_root_relative("net/perl");
    my $d = DirHandle->new($path) or die "Can't open $path $!";

    for my $file ($d->read) {
	next if $file eq "hooks.pl"; 
	next unless $file =~ /\.pl$/;
	Apache->untaint($file);
	my $status = $rl->handler("/perl/$file");
	unless($status == 200) {
	    warn "pre-load of `/perl/$file' failed, status=$status\n";
	}
    }
}

1;