diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-02-21 14:28:20 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-02-21 14:28:20 +0000 |
commit | c8c192ec4cdfe5efacf225714fb2035fc1f954d8 (patch) | |
tree | 23019a67221eb578e565db2a16ef0586215d89f2 /Rpmdrake | |
parent | 80b94ed2ea867f9a533002be1301caae7add89d7 (diff) | |
download | rpmdrake-c8c192ec4cdfe5efacf225714fb2035fc1f954d8.tar rpmdrake-c8c192ec4cdfe5efacf225714fb2035fc1f954d8.tar.gz rpmdrake-c8c192ec4cdfe5efacf225714fb2035fc1f954d8.tar.bz2 rpmdrake-c8c192ec4cdfe5efacf225714fb2035fc1f954d8.tar.xz rpmdrake-c8c192ec4cdfe5efacf225714fb2035fc1f954d8.zip |
perl_checker cleanups
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/edit_urpm_sources.pm | 5 | ||||
-rw-r--r-- | Rpmdrake/formatting.pm | 6 | ||||
-rw-r--r-- | Rpmdrake/gui.pm | 6 | ||||
-rw-r--r-- | Rpmdrake/pkg.pm | 4 |
4 files changed, 10 insertions, 11 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 788b3804..b5d14e98 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -142,7 +142,7 @@ Please check that your network is currently running. Is it ok to continue?", $distro), want_base_distro => $want_base_distro, transient => $::main_window, - arch => $arch, + 'arch' => $arch, ) or return 0; ref $mirror or return; my $wait = wait_msg(N("Please wait, adding media...")); @@ -1001,7 +1001,7 @@ sub mainwindow() { $remove_button and $remove_button->set_sensitive($#rows != -1); # we can only edit/move one item at a time: $_ and $_->set_sensitive(@rows == 1) foreach $up_button, $dw_button, $edit_button; - return if !$#rows == 0; + return if @rows != 1; my $curr_path = $rows[0]; my $first_path = $model->get_path($model->get_iter_first); @@ -1037,7 +1037,6 @@ sub mainwindow() { $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Type"), Gtk2::CellRendererText->new, 'text' => $col{mainw}{type})); $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Medium"), Gtk2::CellRendererText->new, 'text' => $col{mainw}{name})); - $reread_media; #- closure defined later $tr->signal_connect( toggled => sub { my (undef, $path) = @_; diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm index b3e7eb5b..58a5500d 100644 --- a/Rpmdrake/formatting.pm +++ b/Rpmdrake/formatting.pm @@ -115,8 +115,8 @@ our $spacing = " "; sub format_changelog_string { my ($installed_version, $string) = @_; #- preprocess changelog for faster TextView insert reaction - my %date_attr = ( 'weight' => Gtk2::Pango->PANGO_WEIGHT_BOLD ); - my %update_attr = ( 'style' => 'italic'); + my %date_attr = ('weight' => Gtk2::Pango->PANGO_WEIGHT_BOLD); + my %update_attr = ('style' => 'italic'); my $version; my $highlight; [ map { @@ -127,7 +127,7 @@ sub format_changelog_string { $highlight = $installed_version ne N("(none)") && 0 < URPM::rpmvercmp($version, $installed_version); } add2hash(\%attrs, \%update_attr) if $highlight; - [ "$spacing$_\n", if_(%attrs, \%attrs) ] + [ "$spacing$_\n", if_(%attrs, \%attrs) ]; } split("\n", $string) ]; } diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 63a8f0ff..58d7d8fb 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -159,7 +159,7 @@ sub format_pkg_simplifiedinfo { join("\n$spacing", map { "\x{200e}$_" } @{$pkg->{files}} ) . '</tt>') #- to highlight information - : ()}) ]; + : () }) ]; push @$s, [ "\n\n" ]; push @$s, [ build_expander($pkg, N("Changelog:"), 'changelog', sub { $pkg->{changelog} }, $installed_version) ]; $s; @@ -394,7 +394,7 @@ sub ask_browse_tree_given_widgets_for_rpmdrake { @{$ptree{$_}} = difference2($ptree{$_}, \@to_remove); } if (exists $wtree{$cat}) { - my $iter_str = $w->{tree_model}->get_path_str($wtree{$cat}); + my $_iter_str = $w->{tree_model}->get_path_str($wtree{$cat}); $w->{tree_model}->remove($wtree{$cat}); delete $wtree{$cat}; } @@ -517,7 +517,7 @@ sub is_locale_available { sub callback_choices { my (undef, undef, undef, $choices) = @_; - return $choices->[0] if $::rpmdrake_options{'auto'}; + return $choices->[0] if $::rpmdrake_options{auto}; foreach my $pkg (@$choices) { foreach ($pkg->requires_nosense) { /locales-/ or next; diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 70b04e14..cba39f08 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -525,7 +525,7 @@ sub perform_parallel_install { my $temp = chomp_(`mktemp /tmp/rpmdrake.XXXXXXXX`); -e $temp or die N("Could not create temporary directory '%s'", $temp); - my $res = !run_program::get_stderr('urpmi', '2>', $temp, '-v', '--X', '--parallel', $group, @pkgs); + my $res = !run_program::run('urpmi', '2>', $temp, '-v', '--X', '--parallel', $group, @pkgs); my @error_msgs = cat_($temp); if ($res) { @@ -704,7 +704,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( local $::main_window = $gurpm->{mainw}{real_window}; $msg =~ s/:$/\n\n/m; # FIXME: to be fixed in urpmi after 2008.0 interactive_msg( - N("Warning"), "$msg\n\n$msg2", yesno => 1, if_(10 < $msg =~ tr/\n/\n/, scroll => 1), + N("Warning"), "$msg\n\n$msg2", yesno => 1, if_(10 < ($msg =~ tr/\n/\n/), scroll => 1), ) or goto return_with_exit_code; }, post_download => sub { |