summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-09 15:57:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-09 15:57:00 +0000
commit3cfc64680255e73b831fc50fc98e72536f2912f6 (patch)
tree8c7f9bad197523556830c65ed93489f498c0b21c
parent65e9c38d45f493187a15394b61aa41377aa0de5f (diff)
downloadurpmi-3cfc64680255e73b831fc50fc98e72536f2912f6.tar
urpmi-3cfc64680255e73b831fc50fc98e72536f2912f6.tar.gz
urpmi-3cfc64680255e73b831fc50fc98e72536f2912f6.tar.bz2
urpmi-3cfc64680255e73b831fc50fc98e72536f2912f6.tar.xz
urpmi-3cfc64680255e73b831fc50fc98e72536f2912f6.zip
perl_checker compliance
-rwxr-xr-xgurpmi213
1 files changed, 7 insertions, 6 deletions
diff --git a/gurpmi2 b/gurpmi2
index aeff1370..af157ce0 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -33,8 +33,9 @@ sub sync () {
#- sets the window to a please-wait message
sub wait_label {
+ my ($o_text) = @_;
my $wait_vbox = Gtk2::VBox->new(0, 5);
- my $wait_label = Gtk2::Label->new($_[0] || N("Please wait..."));
+ my $wait_label = Gtk2::Label->new($o_text || N("Please wait..."));
$wait_label->set_alignment(0.5, 0.5);
$wait_vbox->pack_start($wait_label, 1, 1, 0);
change_mainw($wait_vbox);
@@ -86,11 +87,11 @@ $mainw->show_all;
Gtk2->main;
#- Creates and configure an urpm object for this application to use.
-sub configure_urpm {
+sub configure_urpm() {
my $urpm = new urpm;
$urpm->{fatal} = sub {
Gtk2::MessageDialog->new($mainw, [qw(modal destroy-with-parent)], 'error', 'ok', Locale::gettext::iconv($_[1], undef, 'UTF-8'))->run;
- quit;
+ quit();
exit $_[0];
};
$urpm->{error} = sub {
@@ -180,11 +181,11 @@ sub ask_continue_blocking {
my $w = Gtk2::MessageDialog->new($mainw, [qw(modal destroy-with-parent)], 'question', 'yes-no', $msg);
my $answer = $w->run;
$w->destroy;
- quit if $answer eq 'no';
+ quit() if $answer eq 'no';
}
sub do_install {
- wait_label;
+ wait_label();
my @ask_remove = $urpm->removed_packages($state);
@ask_remove
? ask_continue(N(
@@ -200,7 +201,7 @@ sub do_install_2 () {
$pkg->arch ne 'src' and push @to_install, scalar $pkg->fullname;
}
$urpm->{nb_install} = @to_install;
- (@to_install > 1 && !$gurpmi::options{auto})
+ @to_install > 1 && !$gurpmi::options{auto}
? ask_continue(N(
"To satisfy dependencies, the following %d packages are going to be installed:\n%s\n",
scalar(@to_install), join "\n", @to_install