[perltidy]
authorHeiko Schlittermann <hs@schlittermann.de>
Tue, 24 May 2016 16:34:10 +0200
changeset 61 68eb79f3f500
parent 60 bb36de81da32
child 62 35374fb32e6e
[perltidy]
lib/Exim/Grey.pm
--- a/lib/Exim/Grey.pm	Wed Jun 01 00:43:09 2016 +0200
+++ b/lib/Exim/Grey.pm	Tue May 24 16:34:10 2016 +0200
@@ -55,17 +55,17 @@
 # starts with "./" or "/".
 
 sub unseen {
-    my $item = shift;
-    my $delay = shift // $DEFAULT{delay};
-    my $db = shift // $DEFAULT{db};
-    my $now = time();
+    my $item   = shift;
+    my $delay  = shift // $DEFAULT{delay};
+    my $db     = shift // $DEFAULT{db};
+    my $now    = time();
     my ($auto) = $item =~ /.*?\/(.+?)$/;
     my $rc;
 
     connectDB(\my %h, $db);
 
-    return 'no'         # not unseen, ergo known
-        if defined $auto and is_whitelisted($auto, \%h);
+    return 'no'    # not unseen, ergo known
+      if defined $auto and is_whitelisted($auto, \%h);
 
     my $key = "$item\0";
 
@@ -78,7 +78,7 @@
     my ($created, undef, $count) = split /[ \0]/, $h{$key};
 
     # we know the client, but last contact was recently (too fast)
-    if ($now - $created < $delay) { 
+    if ($now - $created < $delay) {
         return 'yes';
     }
 
@@ -90,7 +90,7 @@
 }
 
 # According to a thought from "David Woodhouse <dwmw2@infradead.org>"
-# on exim-users@exim.org (Thu, 08 May 2008 13:10:21 +0100, 
+# on exim-users@exim.org (Thu, 08 May 2008 13:10:21 +0100,
 # Message-Id: <1210248621.25560.1088.camel@pmac.infradead.org>) we
 # should have the ability to "auto whitelist" hosts which are known
 # for retries, because there is no benefit in greylisting them.
@@ -116,7 +116,7 @@
     my $key = "$item\0";
 
     return 0 if not exists $h->{$key};
-    
+
     my ($t0, undef, $cnt, $flag) = split /[ \0]/, $h->{$key};
     $h->{$key} = join(' ' => $t0, time, ++$cnt, $flag ? $flag : ()) . "\0";
 
@@ -136,7 +136,7 @@
     }
     -d ($dbdir = "$spooldir/grey") and return $dbdir;
 
-    my ($mode, $owner, $group) = (stat $spooldir)[ 2, 4, 5 ];
+    my ($mode, $owner, $group) = (stat $spooldir)[2, 4, 5];
     {
         local $) = $group;
         local $> = $owner;
@@ -167,7 +167,7 @@
         (my $dir = $db) =~ s/^(.*)\/.*?$/$1/;
 
         # copy mode, uid, gid from the directory
-        my ($mode, $user, $group) = (stat $dir)[ 2, 4, 5 ]
+        my ($mode, $user, $group) = (stat $dir)[2, 4, 5]
           or die "Can't stat $dir: $!";
         my $umask = umask(($mode & 0777) ^ 0777);
         local $) = $group;
@@ -188,7 +188,7 @@
     }
 
     if (exists &DB_File::Lock::TIEHASH) {
-        tie %$h, 'DB_File::Lock', [ $db ], 'write'
+        tie %$h, 'DB_File::Lock', [$db], 'write'
           or die "$0: $db: $!";
         return $db;
     }