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

[lintian] 06/08: L::C::Package: Save a hash look-up



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

nthykier pushed a commit to branch master
in repository lintian.

commit c001340793a883d03cec9831be025fe77dda7be6
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Feb 25 22:50:54 2014 +0100

    L::C::Package: Save a hash look-up
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 lib/Lintian/Collect/Package.pm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index 2b93428..dfa25b2 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -170,9 +170,9 @@ Needs-Info requirements for using I<file_info>: file-info
 
 sub file_info {
     my ($self, $file) = @_;
-    if (exists $self->{file_info}) {
-        return ${$self->{file_info}{$file}}
-          if exists $self->{file_info}->{$file};
+    if (my $cache = $self->{file_info}) {
+        return ${$cache->{$file}}
+          if exists $cache->{$file};
         return;
     }
     my %interned;
@@ -356,9 +356,9 @@ sub _fetch_extracted_dir {
 # sub _fetch_index_data Needs-Info none
 sub _fetch_index_data {
     my ($self, $field, $index, $indexown, $file) = @_;
-    if (exists $self->{$index}) {
-        return $self->{$field}->{$file}
-          if exists $self->{$index}->{$file};
+    if (my $cache = $self->{$field}) {
+        return $cache->{$file}
+          if exists $cache->{$file};
         return;
     }
     my $base_dir = $self->base_dir;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: