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

[lintian] 01/01: c/files.pm: Reduce repeated calls to L::Data->value



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

nthykier pushed a commit to branch master
in repository lintian.

commit dfc485c962a4cba17b4424aeeb7e95c0706b6c62
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Mar 12 21:36:13 2014 +0100

    c/files.pm: Reduce repeated calls to L::Data->value
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/files.pm | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/checks/files.pm b/checks/files.pm
index e0424c8..99bbdfd 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -394,15 +394,12 @@ sub run {
 
         # check for generic obsolete path
         foreach my $obsolete_path ($OBSOLETE_PATHS->all) {
-            my $oldpathmatch
-              = $OBSOLETE_PATHS->value($obsolete_path)->{'match'};
+            my $obs_data = $OBSOLETE_PATHS->value($obsolete_path);
+            my $oldpathmatch = $obs_data->{'match'};
             if ($fname =~ m{$oldpathmatch}) {
-                my $oldpath
-                  = $OBSOLETE_PATHS->value($obsolete_path)->{'olddir'};
-                my $newpath
-                  = $OBSOLETE_PATHS->value($obsolete_path)->{'newdir'};
-                my $moreinfo
-                  = $OBSOLETE_PATHS->value($obsolete_path)->{'moreinfo'};
+                my $oldpath  = $obs_data->{'olddir'};
+                my $newpath  = $obs_data->{'newdir'};
+                my $moreinfo = $obs_data->{'moreinfo'};
                 tag 'package-install-into-obsolete-dir',
                   "$file : $oldpath -> $newpath (see also $moreinfo)";
             }

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


Reply to: