Article View: news.software.readers
Article #243684Re: bug in /usr/share/slrn/contrib/cleanscore
From: Adam Funk
Date: Fri, 10 Dec 2010 13:37
Date: Fri, 10 Dec 2010 13:37
50 lines
2824 bytes
2824 bytes
On 2010-12-10, Ignatios Souvatzis wrote: > Ignatios Souvatzis wrote: >> On 2010-11-29, Adam Funk <a24061@ducksburg.com> wrote: >>> I've found a bug in the cleanscore Perl program that comes with slrn; >>> basically, if a rule includes the string "Expires:" after the header >>> [1], the %this_entry values around line 250 are uninstantiated, so the >>> script wants to delete the stanza regardless of the date on the line >>> that begins with "Expires:". AFAICT, the fix is as follows: >>> >>> >>> #v+ >>> $ diff /usr/share/slrn/contrib/cleanscore bin/cleanscore >>> 234c234 >>> < if (/Expires:/i) >>> --- >>> > if (/^Expires:/i) >>> #v- >>> >>> >>> >>> [1] for example: >>> Subject: How to insert Expires: header >> >> While I agree that this should be anchored at line start... what about >> the if (/Scores:/i) and the if (/\#EOF... and friends in the same loop? They should probably be fixed too! I just haven't come across any rules containing those strings in my own scorefile yet. > Actually, /^Expires is wrong. According to scores.txt, whitespace is > allowed before the keywords. I'd suggest something like > > if (/^[ ]*Expires:/i) (that is: [ space tab ] ), but have to > check whether slang regular expressions use that syntax. How about #v+ if (/^\s*Expires:/i) #v- (The cleanscore program is written in Perl, where \s matches any whitespace character.) -- Nam Sibbyllam quidem Cumis ego ipse oculis meis vidi in ampulla pendere, et cum illi pueri dicerent: beable beable beable; respondebat illa: doidy doidy doidy. [plorkwort]
Technical Details
Message-ID:
<p1n9t7xmc9.ln2@news.ducksburg.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed101.telia.com!starscream.dk.telia.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<p32ds7xrs5.ln2@news.ducksburg.com> <slrnig42e6.pd.ignatios@einstein.cs.uni-bonn.de> <slrnig443f.bhi.u502sou@marie.beverly.kleinbus.org>Show Full Headers
Complete Article Headers
Message-ID: <p1n9t7xmc9.ln2@news.ducksburg.com> Subject: Re: bug in /usr/share/slrn/contrib/cleanscore Date: Fri, 10 Dec 2010 13:37:29 +0000 From: Adam Funk <a24061@ducksburg.com> References: <p32ds7xrs5.ln2@news.ducksburg.com> <slrnig42e6.pd.ignatios@einstein.cs.uni-bonn.de> <slrnig443f.bhi.u502sou@marie.beverly.kleinbus.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed101.telia.com!starscream.dk.telia.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.readers Organization: $CABAL Lines: 50 X-Trace: individual.net +4YQ6kU/PX++MnfDa5mX7AH68j03cp+Hqfo1BLr6oN1RbCkAqP X-Orig-Path: news.ducksburg.com!not-for-mail Cancel-Lock: sha1:PCsgu535eqft4Evn0x3rE7hg4yY= sha1:dXDokXEiPr153Z0mXXmGTfhPULI= User-Agent: slrn/pre1.0.0-16/mm/ao (Ubuntu Intrepid) X-Original-Bytes: 2556