The following commit has been merged in the master branch:
commit 2b8f9431f1b783d56dfd06ede71e3d7fa31c51ee
Author: Jakub Wilk <[email protected]>
Date:   Sat Sep 3 19:59:39 2011 +0200

    Reuse existing variable instead of querying $info->field
    
    Signed-off-by: Niels Thykier <[email protected]>

diff --git a/checks/files b/checks/files
index 836cc58..033438b 100644
--- a/checks/files
+++ b/checks/files
@@ -783,9 +783,8 @@ foreach my $file (@{$info->sorted_index}) {
         # check if it's one of the Python proper packages
        unless (defined $is_python) {
            $is_python = 0;
-           if (defined $info->field('source')) {
-               local $_ = $info->field('source');
-               $is_python = 1 if /^python(?:\d\.\d)?(?:$|\s)/;
+           if ($source_pkg) {
+               $is_python = 1 if $source_pkg =~ m/^python(?:\d\.\d)?(?:$|\s)/;
            }
        }
        tag 'third-party-package-in-python-dir', $file
@@ -796,9 +795,8 @@ foreach my $file (@{$info->sorted_index}) {
        # check if it's the "perl" package itself
        unless (defined $is_perl) {
            $is_perl = 0;
-          if (defined $info->field('source')) {
-               local $_ = $info->field('source');;
-               $is_perl = 1 if /^perl(?:$|\s)/;
+          if ($source_pkg) {
+               $is_perl = 1 if $source_pkg =~ m/^perl(?:$|\s)/;
            }
        }
        tag 'perl-module-in-core-directory', $file

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to