Elizabeth Mattijsen wrote:
At 13:55 -0800 1/26/04, Stas Bekman wrote:

You don't need the loop, I was talking about adding directives to an already existing vhosts.

Just do at startup.pl or <Perl> sections:

my $config = get_my_httpd_conf_config();
$s->add_config([split /\n/, $config]);

get_my_httpd_conf_config() should return the config section as if you have written it in httpd.conf.


Hmmm... I'm having trouble getting at the $s:

use Apache2 ();
use Apache::Server ();
my $server = Apache->server;
__END__
Can't locate object method "server" via package "Apache" line 3.


Whereas http://perl.apache.org/docs/2.0/api/Apache.html states:


There are several modules that require the Apache class as the first argument to the class methods that they define. For example Apache::Server defines a class method Apache->server :
use Apache::Server;
my $server = Apache->server;


% lookup server
There is more than one class with method 'server'
try one of:
        use Apache::RequestRec ();
        use Apache::CmdParms ();
        use Apache::ServerUtil ();


You need to load 'Apache::ServerUtil'. As you know from the dev list thread, we are trying to make things DWIM'ish, so I won't mess with docs till we get it all the API changes finalized.



__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to