diff options
author | Thierry Vignaud <tv@mageia.org> | 2011-09-20 18:39:59 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2011-09-20 18:39:59 +0000 |
commit | 80028325730760ee817b75eb3b5c2c67aaa089b3 (patch) | |
tree | 83583b369de40b6f41d558bbe813d9070f8998ce /URPM | |
parent | 90eee80969aa54b3bc610338e0c9449e5dfef51f (diff) | |
download | perl-URPM-80028325730760ee817b75eb3b5c2c67aaa089b3.tar perl-URPM-80028325730760ee817b75eb3b5c2c67aaa089b3.tar.gz perl-URPM-80028325730760ee817b75eb3b5c2c67aaa089b3.tar.bz2 perl-URPM-80028325730760ee817b75eb3b5c2c67aaa089b3.tar.xz perl-URPM-80028325730760ee817b75eb3b5c2c67aaa089b3.zip |
perl_checker cleanups
Diffstat (limited to 'URPM')
-rw-r--r-- | URPM/Build.pm | 2 | ||||
-rw-r--r-- | URPM/Query.pm | 8 | ||||
-rw-r--r-- | URPM/Resolve.pm | 10 | ||||
-rw-r--r-- | URPM/Signature.pm | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/URPM/Build.pm b/URPM/Build.pm index f298707..2659b88 100644 --- a/URPM/Build.pm +++ b/URPM/Build.pm @@ -424,7 +424,7 @@ sub build_synthesis { @idlist = $urpm->build_listid($options{start}, $options{end}, $options{idlist}); $ratio = $options{ratio} || 9; - $filter = $options{filter} ? $options{filter} : "gzip -$ratio"; + $filter = $options{filter} || "gzip -$ratio"; $options{synthesis} || defined $options{fd} or die "invalid parameters given"; #- first pass: traverse provides to find files provided. diff --git a/URPM/Query.pm b/URPM/Query.pm index 14256a4..15cbe29 100644 --- a/URPM/Query.pm +++ b/URPM/Query.pm @@ -21,7 +21,7 @@ sub tag2id { sub query_pkg { my (undef, $pkg, $query) = @_; my @tags = map { - [ $pkg->get_tag(tag2id($_)) ] + [ $pkg->get_tag(tag2id($_)) ]; } $query =~ m/\%\{([^{}]*)\}*/g; $query =~ s/\%\{[^{}]*\}/%s/g; @@ -29,12 +29,12 @@ sub query_pkg { $query =~ s/\\t/\t/g; my ($max, @res) = 0; - foreach (@tags) { $max < $#{$_} and $max = $#{$_} }; + foreach (@tags) { $max < $#{$_} and $max = $#{$_} } foreach my $i (0 .. $max) { - push(@res, sprintf($query, map { ${$_}[ $#{$_} < $i ? $#{$_} : $i ] } @tags)); + push @res, sprintf($query, map { ${$_}[ $#{$_} < $i ? $#{$_} : $i] } @tags); } - @res + @res; } 1; diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 7e8aaf2..03d7657 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -546,8 +546,8 @@ sub with_state_unsatisfied_requires { sub with_any_unsatisfied_requires { my ($urpm, $db, $state, $name, $do) = @_; - with_db_unsatisfied_requires($urpm, $db, $state, $name, sub { my ($p, @l) = @_; $do->($p, 0, @l)}); - with_state_unsatisfied_requires($urpm, $db, $state, $name, sub { my ($p, @l) = @_; $do->($p, 1, @l)}); + with_db_unsatisfied_requires($urpm, $db, $state, $name, sub { my ($p, @l) = @_; $do->($p, 0, @l) }); + with_state_unsatisfied_requires($urpm, $db, $state, $name, sub { my ($p, @l) = @_; $do->($p, 1, @l) }); } @@ -580,7 +580,7 @@ sub backtrack_selected { my $closure = $state->{rejected}{$_->fullname}{closure} || {}; foreach my $p (grep { exists $closure->{$_}{avoid} } keys %$closure) { - _add_rejected_backtrack($state, $_, { conflicts => [ $p ] }) + _add_rejected_backtrack($state, $_, { conflicts => [ $p ] }); } #- backtrack callback should return a strictly positive value if the selection of the new #- package is prefered over the currently selected package. @@ -1058,7 +1058,7 @@ sub resolve_requested__no_suggests_ { sub _handle_conflicts_with_selected { my ($urpm, $db, $state, $pkg, $dep, $properties, $diff_provides, %options) = @_; foreach ($pkg->conflicts) { - if (my ($n, $o, $v) = property2name_op_version($_)) { + if (my ($n, $_o, $_v) = property2name_op_version($_)) { foreach my $p ($urpm->packages_providing($n)) { $pkg == $p and next; $p->provides_overlap($_) or next; @@ -1254,7 +1254,7 @@ sub _handle_diff_provides { @packages = grep { ($_->name eq $p->name ? $p->compare_pkg($_) < 0 : $_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release)) - && (!strict_arch($urpm) || strict_arch_check($p, $_)) + && (!strict_arch($urpm) || strict_arch_check($p, $_)); } @packages; if (!@packages) { diff --git a/URPM/Signature.pm b/URPM/Signature.pm index 003af07..44cd2ef 100644 --- a/URPM/Signature.pm +++ b/URPM/Signature.pm @@ -30,7 +30,7 @@ sub parse_pubkeys_ { my $found_blank = 0; foreach (split "\n", $p->description) { if ($block) { - if (/^$/ and not $found_blank) { + if (/^$/ && !$found_blank) { # All content until now were the encapsulated pem # headers... $content = ''; @@ -58,7 +58,7 @@ sub parse_pubkeys_ { } #- obsoleted -sub import_needed_pubkeys { +sub import_needed_pubkeys() { warn "import_needed_pubkeys prototype has changed, please give a file directly\n"; return; } @@ -85,7 +85,7 @@ sub import_needed_pubkeys_from_file { #- let the caller know about what has been found. #- this is an error if the key is not found. - $o_callback and $o_callback->($kv?$kv->{id}:undef, $imported); + $o_callback and $o_callback->($kv ? $kv->{id} : undef, $imported); } 1; |