Skip Menu |

This queue is for tickets about the Config-General CPAN distribution.

Report information
The Basics
Id: 8261
Status: resolved
Priority: 0/
Queue: Config-General

People
Owner: Nobody in particular
Requestors: fred.kubli [...] ubs.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.27
Fixed in: (no value)



Subject: erroneous warning: invalid syntax: found end of C-comment without previous start!
Hello: I have the following Apache configuration file scenarios: 1) */ in a comment line # EBCDICConvertByType Off=InOut */* generated the warning: invalid syntax: found end of C-comment without previous start! 2) */ in a path <Directory /home/*/public_html> . . . Also a warning: invalid syntax: found end of C-comment without previous start! EndBlock "</Directory>" has no StartBlock statement (level: 1, chunk 123)! 3) ScriptAliasMatch ^/cgi.*/(.*) /usr/local/apache/cgi-bin/$1 Also a warning: invalid syntax: found end of C-comment without previous start! I am not sure but my 'default' Apache conf with: <Directory /> Options FollowSymLinks AllowOverride None </Directory> as described in Bug #7957 does parse properly. I tried to turn off: -CComments => 'Off' but it does not ignore the */ Regards - Fred PS: I also would have a question. Is there an easy way to insert a line in a <virtual >...</virtual> section and keep all the comments and blanks ?
[guest - Fri Nov 5 16:45:52 2004]: Show quoted text
> 1) */ in a comment line > > # EBCDICConvertByType Off=InOut */* > > generated the warning: > invalid syntax: found end of C-comment without previous start!
This seems to be a bug, I'll investigate it this evening. Show quoted text
> PS: I also would have a question. > Is there an easy way to insert a line in a <virtual >...</virtual> > section and keep all the comments and blanks ?
No, it's not possible to keep comments or whitespaces. Tom
Unfortunately I can't reproduce the bug, I tried it with latest version 2.28. This is the config used: ceta = haha ah = 123 \ koll hugo = $ceta # EBCDICConvertByType Off=InOut */* <Directory /home/*/public_html> blah = 9 </Directory> ScriptAliasMatch ^/cgi.*/(.*) /usr/local/apache/cgi-bin/$1 data <<EOF max had a mirror max had a mirror max had a mirror max had a mirror EOF This is the testscript: #!/usr/bin/perl -w use lib qw(/Users/scip/D/ConfigModul/Config-General-2.28/blib/lib); use strict; use Data::Dumper; use Config::General; my %hash = ParseConfig( -ConfigFile => shift(), #-InterPolateVars => 1, #-IncludeRelative => 1, -CComments => 0 ); print Dumper(\%hash); And this is its output: scip@spock: $ ./t.pl t.cfg $VAR1 = { 'ScriptAliasMatch' => '^/cgi.*/(.*) /usr/local/apache/cgi-bin/$1', 'ceta' => 'haha', 'hugo' => '$ceta', 'Directory' => { '/home/*/public_html' => { 'blah' => '9' } }, 'data' => 'max had a mirror max had a mirror max had a mirror max had a mirror', 'ah' => '123 koll' }; - Tom
please try the latest version (as of this writing 2.28, 2.29 will be released this night). Tom