summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2012-12-30 03:08:21 +0100
committerGuillem Jover <guillem@debian.org>2013-04-29 18:46:50 +0200
commit14b92d54d044fc9b932997869107a1ae02a1a60f (patch)
tree31dc5ea0f3f85b5b3f0a6db3dacc361d3f912fa8 /scripts/Dpkg/Control
parentf215ebacf1183e33da3287533c8eec60cc5af418 (diff)
downloaddpkg-14b92d54d044fc9b932997869107a1ae02a1a60f.tar.gz
scripts: Do not use sort directly on the return keyword
Fixes Subroutines::ProhibitReturnSort. Warned-by: perlcritic
Diffstat (limited to 'scripts/Dpkg/Control')
-rw-r--r--scripts/Dpkg/Control/Fields.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm
index 56ae2f126..b3c61f9cc 100644
--- a/scripts/Dpkg/Control/Fields.pm
+++ b/scripts/Dpkg/Control/Fields.pm
@@ -512,12 +512,13 @@ Debian package.
=cut
sub field_list_src_dep() {
- return sort {
+ my @list = sort {
$FIELDS{$a}{'dep_order'} <=> $FIELDS{$b}{'dep_order'}
} grep {
field_is_allowed_in($_, CTRL_PKG_SRC) and
exists $FIELDS{$_}{'dependency'}
} keys %FIELDS;
+ return @list;
}
=item field_list_pkg_dep()
@@ -530,12 +531,13 @@ the stronger to the weaker.
sub field_list_pkg_dep() {
my @keys = keys %FIELDS;
- return sort {
+ my @list = sort {
$FIELDS{$a}{'dep_order'} <=> $FIELDS{$b}{'dep_order'}
} grep {
field_is_allowed_in($_, CTRL_PKG_DEB) and
exists $FIELDS{$_}{'dependency'}
} @keys;
+ return @list;
}
=item field_get_dep_type($field)