diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-22 16:02:32 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-22 16:02:32 +0000 |
commit | f4194e1a6109b908b64bd8794000b31d52d56b8b (patch) | |
tree | d360a09683a42a1dd4a689caa324de8b3dc041c5 /URPM/Resolve.pm | |
parent | a1617752759e8ad7288b0a6b53ea2e9ee833020a (diff) | |
download | perl-URPM-f4194e1a6109b908b64bd8794000b31d52d56b8b.tar perl-URPM-f4194e1a6109b908b64bd8794000b31d52d56b8b.tar.gz perl-URPM-f4194e1a6109b908b64bd8794000b31d52d56b8b.tar.bz2 perl-URPM-f4194e1a6109b908b64bd8794000b31d52d56b8b.tar.xz perl-URPM-f4194e1a6109b908b64bd8794000b31d52d56b8b.zip |
minor style enhancements
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 890abbe..9431044 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -287,7 +287,7 @@ sub _find_required_package__sort { my @chosen = map { $_->[0] } @chosen_with_score; #- return immediately if there is only one chosen package - if (@chosen == 1) { return \@chosen } + return \@chosen if @chosen == 1; #- if several packages were selected to match a requested installation, #- and if --more-choices wasn't given, trim the choices to the first one. @@ -1487,9 +1487,7 @@ sub disable_selected_and_unrequested_dependencies { #- keep in the packages that had to be unselected. @all_unselected or push @all_unselected, @unselected; - if ($urpm->{keep_unrequested_dependencies}) { - last; - } + last if $urpm->{keep_unrequested_dependencies}; #- search for unrequested required packages. foreach (@unselected) { @@ -1649,9 +1647,7 @@ sub compute_flags { sub _choose_best_pkg { my ($urpm, $pkg_installed, @pkgs) = @_; - _choose_best_pkg_($urpm, $pkg_installed, grep { - $_->compare_pkg($pkg_installed) > 0; - } @pkgs); + _choose_best_pkg_($urpm, $pkg_installed, grep { $_->compare_pkg($pkg_installed) > 0 } @pkgs); } #- side-effects: none |