On Mon, Nov 21, 2011 at 9:03 AM, Josh Narins <jnar...@seniorbridge.com> wrote:
> So, different ways to get this config to apache include:
>
> my $r = Apache2::RequestUtil->request;
> $r->add_config($template->output);
>
> But that results in the error "Global $r object is not available." and the 
> server does not start.

Yes, that's what I was getting at: there's no request during startup
when your httpd.conf is being processes, so there's no $r object to
get.

I don't use this config stuff at all, but looking in the docs I think
this might work for you:

use Apache2::ServerUtil ();
$s = Apache2::ServerUtil->server;
$s->add_config($config);

- Perrin
> The other two, similar, ways I know about involve $PerlConfig and 
> @PerlConfig, and while neither prevents server startup, Apache2::Directive 
> shows that they didn't do anything, with or without the hack mentioned by 
> Randal here:
>
> http://www.gossamer-threads.com/lists/modperl/modperl/85304?do=post_view_threaded#85304
>
> And, just so we are all sure, $template->output produces both the content I 
> expect and content that works to start the server. If I simply replace the 
> <Perl> section with the generated output the server starts.
>
>> I'm not sure I can help with the larger issue since I always stay away
>> from $PerlConfig.  I prefer to generate the entire config file as a
>> template, so that I can use it for the front-end proxy as well.
>
>
>
> Josh Narins
> Director of Application Development
> SeniorBridge
>
> 845 Third Ave
> 7th Floor
> New York, NY 10022
> Tel: (212) 994-6194
> Mobile: (917) 488-6248
> Fax: (212) 994-4260
> jnar...@seniorbridge.com
>
> SeniorBridge
> Managing Complex Chronic Care
> http://www.seniorbridge.com
>
>
>
> SeniorBridge Statement of Confidentiality: The contents of this email message 
> are intended for the exclusive use of the addressee(s) and may contain 
> confidential or privileged information. Any dissemination, distribution or 
> copying of this email by an unintended or mistaken recipient is strictly 
> prohibited. In said event, kindly reply to the sender and destroy all entries 
> of this message and any attachments from your system. Thank you.
>

Reply via email to