File: ModuleConfig.pm

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 (33 lines) | stat: -rw-r--r-- 542 bytes parent folder | download
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
28
29
30
31
32
33
package Apache::ModuleConfig;
use strict;
$Apache::ModuleConfig::VERSION = "0.01";

unless(defined &bootstrap) {
    require DynaLoader;
    @Apache::ModuleConfig::ISA = qw(DynaLoader);
}

if($ENV{MOD_PERL}) {
    __PACKAGE__->bootstrap;
}

sub has_srv_config {
    my $file = (caller)[1];
    if($Apache::ServerStarting == 1) {
	delete $INC{$file};
    }
}

sub dir_merge {
    my($base, $add) = @_;
    my %new = ();
    @new{ keys %$base, keys %$add} = 
	(values %$base, values %$add);

    return bless \%new, ref($base);
}

1;

__END__