|
From: <pe...@go...> - 2010-12-14 22:36:22
|
On 14/12/2010 21:57, pe...@go... wrote:
> # We only need one of these stanza, so pick either config file.
> # Whichever file you pick will set things like the network map type.
>
> { package HTML::Mason::Commands;
> use netdisco qw/:all/;
> &netdisco::config('/etc/netdisco/netdisco.conf');
> }
>
> < snip >
>
> sub handler {
> my $request = shift;
> $netdisco::CONFIG{webpath} = '/netdisco';
> $netdisco::CONFIG{db_Pg} = 'dbi:Pg:dbname=netdisco';
> return $ah->handle_request($request);
> }
> }
So thinking about it a little more, it's likely you can override any
config variable from netdisco.conf in the handler().
It's unfortunate duplication of course, but that's the way to
achieve separate network map config etc, if you really want it. The
two variables I've included in hander() above are the minimum
required for multiple frontends (in the same Apache2).
Given some thought the dev team could probably come up with
something more elegant for a future release :-) (a closure?)
HTH,
oliver.
|