'use strict', cleanup everywhere

Florian Schlichting fschlich at CIS.FU-Berlin.DE
Tue Aug 2 16:50:53 UTC 2011


Hi Julien,

> Shouldn't the parentheses be kept?
> 
> open (my $OLDACT, '<', $oldact) || die "$0: open $oldact: $!\n";

thanks a lot for spotting this error, and also the other issues in
signcontrol and scanspool. I really should have tested my changes with
more than just 'perl -wc'!

The bracket-less version should have used the low-precedence 'or'
instead of '||', but I think the way forward is to 'use autodie' once
everyone is using Perl 5.10.1...


I've gone through all the other changes without noticing anything in
particular; with the exception of the passwd.nntp check in inncheck,
where I had also anchored the pattern to the start of the line (I
probably failed to post that version then); this will detect leading
garbage e.g. wrongly commenting out a line with //


--- a/scripts/inncheck.in
+++ b/scripts/inncheck.in
@@ -901,7 +901,7 @@ passwd_nntp
     input: while ( <$IN> ) {
        next input if spacious($file, ++$line);

-       unless ( ($name, $pass) = /[\w\-\.]+:([^:]*):([^:]*)(:authinfo)?$/ ) {
+       unless ( ($name, $pass) = /^[\w\-\.]+:([^:]*):([^:]*)(:authinfo)?$/ ) {
            eprint "$file:$line: malformed line.\n";
            next input;
        }



Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5557 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20110802/91f105c6/attachment.bin>


More information about the inn-workers mailing list