Article View: news.software.nntp
Article #66176Re: innreport error
From: Steve
Date: Thu, 17 Jul 2003 09:56
Date: Thu, 17 Jul 2003 09:56
55 lines
2602 bytes
2602 bytes
Steve wrote:
> Running inn-2.4.0:
>
> I'm trying to track down an error I'm receiving when running
> innreport:
>
> innreport -f /usr/local/news/etc/innreport.conf -config
>
> Returns:
>
> Error in /usr/local/news/etc/innreport.conf line 12: must be
> 'section' instead of '#'
I've located the source of this error, but am at a loss as to what to
do about it. The problem occurs within the sub read_conf section of
innreport:
sub read_conf {
my ($linenum, $line, $file) = @_;
*FILE = *$file;
$line =~ s,^\s+,,o; # remove useless blanks
$line =~ s,^(\#|//).*$,,o; # remove comments (at the beginning)
while (($line =~ m/^$/o || $line =~ m/^\"[^\"]*$/o) && !(eof (FILE)))
{
$line .= <FILE>; # read one line
$linenum++;
$line =~ s,^\s*,,om; # remove useless blanks
$line =~ s,^(\#|//).*$,,om; # remove comments (at the beginning)
}
$line =~ s/^( # at the beginning
[{};] # match '{', '}', or ';'
| # OR
\" # a double quoted string
(?:\\.|[^\"\\])*
\"
| # OR
[^{};\"\s]+ # a word
)\s*//mox;
my $info = $1;
if (defined $info && $info) {
chomp $info;
}
On the pass that causes the error:
$line = section default {
The "my $info = $1" line is supposed to return "section", but $1 = "#"
instead which results in the error: "must be 'section' instead of '#'
Not having any knowledge of Perl, I really don't understand why $1
should contain the first word of $line, but obviously it should.
Technical Details
Message-ID:
<bf5rrq$opb$1@bananasplit.info>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!news-out.tin.it!news-in.tin.it!news.mailgate.org!newsfeed.icl.net!newsfeed.fjserv.net!news.itconsult.net!news.dizum.com!sewer-output!mail2newsReferences:
<bf3jb2$j5s$1@bananasplit.info>Show Full Headers
Complete Article Headers
Message-ID: <bf5rrq$opb$1@bananasplit.info> Subject: Re: innreport error Date: Thu, 17 Jul 2003 09:56:10 +0000 From: Steve <steve@nospam-goofer.co.uk> References: <bf3jb2$j5s$1@bananasplit.info> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!news-out.tin.it!news-in.tin.it!news.mailgate.org!newsfeed.icl.net!newsfeed.fjserv.net!news.itconsult.net!news.dizum.com!sewer-output!mail2news Newsgroups: news.software.nntp Organization: Bananasplit Lines: 54 X-Complaints-To: abuse@bananasplit.info User-Agent: Xnews/06.02.16 Mail-To-News-Contact: abuse@dizum.com