abaxaba has asked for the wisdom of the Perl Monks concerning the following question:
in httpd.conf PerlSetVar streamDB "/adconfig/config" PerlSetVar clickDB "/adconfig/click" PerlChildInitHandler Config PerlTransHandler Serve
in Config.pm sub handler { my $r=shift; my $config=$r->dir_config('streamDB'); my $click=$r->dir_config('clickDB'); %CORE::GLOBAL::config = new BerkeleyDB::Hash -Filename => $config, -Flags => "DB_RDONLY" or die "Cannot open file $config: $!$BerkleleyDB::Error\n"; }
I've got the requisite use statments and such in Config.pm, and have tried tied hashes, stashing hashrefs in pnotes and untied hashes, and am now at the end of my rope. Any thoughts?In Serve.pm sub handler { my $r=shift; unless (scalar(keys %CORE::GLOBAL::config)) { die ("no config data loaded"); } # Code Always dies }
| ÅßÅ×ÅßÅ
"It is a very mixed blessing to be brought back from the dead." -- Kurt Vonnegut |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Berkeley Access through Apache request phases
by bageler (Hermit) on Aug 03, 2004 at 05:51 UTC | |
|
Re: Berkeley Access through Apache request phases
by perrin (Chancellor) on Aug 03, 2004 at 15:39 UTC | |
by bageler (Hermit) on Aug 03, 2004 at 15:48 UTC |