[Pkg-privacy-commits] [msva-perl] 323/356: remove findall argument, clean up indentation

Ximin Luo infinity0 at moszumanska.debian.org
Mon Aug 24 07:42:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository msva-perl.

commit 484d69889fa4af71b45fd84ab0bec506f3d03983
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Wed Apr 20 13:14:59 2011 -0400

    remove findall argument, clean up indentation
---
 Crypt/Monkeysphere/Validator.pm | 41 ++++++++++++++++++-----------------------
 1 file changed, 18 insertions(+), 23 deletions(-)

diff --git a/Crypt/Monkeysphere/Validator.pm b/Crypt/Monkeysphere/Validator.pm
index dacea6d..b49c7a6 100644
--- a/Crypt/Monkeysphere/Validator.pm
+++ b/Crypt/Monkeysphere/Validator.pm
@@ -12,15 +12,13 @@ use parent 'Crypt::Monkeysphere::Keyserver';
 Create a new Crypt::Monkeysphere::Validator instance
 
 Arguments
-  
-     Param hash, all optional.
 
-     findall => 0|1   return all suitable keys, rather than first suitable
+     Param hash, all optional.
 
-     context => 'e-mail' | something else. 
-			control what counts as a suitable key.
+     context => 'e-mail' | 'https' | 'ssh', etc.
+			control what counts as a suitable user IDs.
 
-     kspolicy => 'always|never|unlessvalid'   
+     kspolicy => 'always|never|unlessvalid'
 			when to fetch keys from keyserver.
 
   (plus arguments for Crypt::Monkeysphere::{Keyserver,Logger}::new )
@@ -33,7 +31,6 @@ sub new {
 
   my $self=$class->SUPER::new(%opts);
 
-  $self->{findall} = $opts{findall} || 0;
   $self->{context}=$opts{context} || 'ssh';
   $self->{kspolicy}=$opts{kspolicy} || 'unlessvalid';
   return $self;
@@ -109,7 +106,7 @@ sub query{
 		$self->log('verbose', "...and is fully valid!\n");
 		push(@{$ret->{valid_keys}},
 		     { fingerprint => $subkey->fingerprint, val => $validity });
-		last unless($self->{findall});
+		last;
 	      } else {
 		$self->log('verbose', "...but is not fully valid (%s).\n",$validity);
 		push(@{$ret->{subvalid_keys}},
@@ -118,24 +115,22 @@ sub query{
 	    }
 	  }
 	}
-	last if ($foundvalid);
-      }
-      if ($lastloop || $foundvalid) {
-	last;
-      } else {
-	if (!$foundvalid) {
-	  if (defined $fpr) {
-	    $self->fetch_fpr($fpr);
-	  } else {
-	    $self->fetch_uid($uid);
-	  }
-	}
-	$lastloop = 1;
+      last if ($foundvalid);
+    }
+    if ($lastloop || $foundvalid) {
+      last;
+    } else {
+      if (!$foundvalid) {
+        if (defined $fpr) {
+          $self->fetch_fpr($fpr);
+        } else {
+          $self->fetch_uid($uid);
+        }
       }
+      $lastloop = 1;
     }
-
+  }
   return $ret;
-
 }
 
 sub keycomp {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git



More information about the Pkg-privacy-commits mailing list