summaryrefslogtreecommitdiff
path: root/scripts/dpkg-shlibdeps.pl
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-05-06 01:33:17 +0200
committerGuillem Jover <guillem@debian.org>2014-05-17 13:30:52 +0200
commit1e5163809eff116ff1b34956562e1f6ec0bbf370 (patch)
tree006c0dee78f48137778ecf46aab43eb6d644ec6a /scripts/dpkg-shlibdeps.pl
parent395f6ced94938c72927575e8d5b40305da321799 (diff)
downloaddpkg-1e5163809eff116ff1b34956562e1f6ec0bbf370.tar.gz
perl: Fix unused capture groups false positives
These are false positives, as when there's no match perl will leave the subpattern variables untouched. We'll just use the opportunity to unconfuse perlcritic, making some of those variable usages more clear by using intermediate variables. Fixes RegularExpressions::ProhibitUnusedCapture. Warned-by: perlcritic
Diffstat (limited to 'scripts/dpkg-shlibdeps.pl')
-rwxr-xr-xscripts/dpkg-shlibdeps.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 5b51b6d15..dcc114db9 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -860,7 +860,8 @@ sub find_packages {
print { *STDERR } " $_\n"
or syserr(_g('write diversion info to stderr'));
} elsif (m/^([-a-z0-9+.:, ]+): (\/.*)$/) {
- $cached_pkgmatch{$2} = $pkgmatch->{$2} = [ split(/, /, $1) ];
+ my ($pkgs, $path) = ($1, $2);
+ $cached_pkgmatch{$path} = $pkgmatch->{$path} = [ split /, /, $pkgs ];
} else {
warning(_g("unknown output from dpkg --search: '%s'"), $_);
}