diff options
author | Guillem Jover <guillem@debian.org> | 2014-05-06 01:33:17 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-05-17 13:30:52 +0200 |
commit | 1e5163809eff116ff1b34956562e1f6ec0bbf370 (patch) | |
tree | 006c0dee78f48137778ecf46aab43eb6d644ec6a /scripts/dpkg-shlibdeps.pl | |
parent | 395f6ced94938c72927575e8d5b40305da321799 (diff) | |
download | dpkg-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-x | scripts/dpkg-shlibdeps.pl | 3 |
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'"), $_); } |