[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, lab-refactor, updated. 2.5.3-190-g2e55f6b



The following commit has been merged in the lab-refactor branch:
commit 2e55f6bf1098e97db7d952c83009684c5d6c8bd3
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Nov 2 11:48:53 2011 +0100

    L::L::Manifest: ignore extra keys passed to get
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/lib/Lintian/Lab/Manifest.pm b/lib/Lintian/Lab/Manifest.pm
index 4ed16e7..df32fe6 100644
--- a/lib/Lintian/Lab/Manifest.pm
+++ b/lib/Lintian/Lab/Manifest.pm
@@ -472,7 +472,11 @@ sub _do_read_file {
 sub _do_get {
     my ($self, $root, @keys) = @_;
     my $cur = $root;
-    foreach my $key (@keys) {
+    my (undef, undef, $qf) = $self->_type_to_fields;
+    my $max = scalar @$qf;
+    $max = scalar @keys if scalar @keys < $max;
+    for (my $i = 0 ; $i < $max ; $i++) {
+        my $key = $keys[$i];
         $cur = $cur->{$key};
         return unless defined $cur;
     }

-- 
Debian package checker


Reply to: