On 10/15/05, Risanecek <[EMAIL PROTECTED]> wrote: > Hi, > > trying to do my vhosts configurations with perl. No luck so far: > > config: Apache 2.0.54, mod_perl 2.0.1, perl 5.8.7 > > a simple > > <Perl> > $aha = 'var'; > </Perl> > > throws this error when trying to start Apache2 > > Syntax error on line 2 of /opt/apache2/conf/vhosts.d/vhostraw.conf: > $parms->add_config() has failed: Invalid command 'aha', perhaps > mis-spelled or defined by a module not included in the server > configuration at > /usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/Apache2/PerlSections.pm > line 203.\n > > HowTo?
Global variables are translated directly into Apache directives. So your config is the same as aha var Declare it as a lexical instead: my $aha = 'var'; d.