diff options
author | João Victor Duarte Martins <jvictor@mandriva.com> | 2010-06-01 17:49:00 +0000 |
---|---|---|
committer | João Victor Duarte Martins <jvictor@mandriva.com> | 2010-06-01 17:49:00 +0000 |
commit | f44b570c09c9e6652a332bba2c04770c47924a0a (patch) | |
tree | 43597ff232151c3def2fb93ef9e3c36793cecb95 /mdkapplet-add-media-helper | |
parent | dba69715591ac40656aee57e16e38c26c4b24d05 (diff) | |
download | mgaonline-f44b570c09c9e6652a332bba2c04770c47924a0a.tar mgaonline-f44b570c09c9e6652a332bba2c04770c47924a0a.tar.gz mgaonline-f44b570c09c9e6652a332bba2c04770c47924a0a.tar.bz2 mgaonline-f44b570c09c9e6652a332bba2c04770c47924a0a.tar.xz mgaonline-f44b570c09c9e6652a332bba2c04770c47924a0a.zip |
Syntax cleanup (perl_checker recommendations).
Diffstat (limited to 'mdkapplet-add-media-helper')
-rwxr-xr-x | mdkapplet-add-media-helper | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mdkapplet-add-media-helper b/mdkapplet-add-media-helper index 48693723..ee346a67 100755 --- a/mdkapplet-add-media-helper +++ b/mdkapplet-add-media-helper @@ -103,7 +103,7 @@ my $title = N("Adding an additional package medium"); $product_id or mdkonline::get_product_id(); # Product id data should be used in lowercase. - $up_product = lc $product_id->{product} unless $up_product; + $up_product ||= lc $product_id->{product}; # Sanitizes product command line argument. unless (exists $product{$up_product}) { @@ -141,7 +141,7 @@ sub authenticate_callback { $title, N("Your Mandriva account does not have %s download subscription enabled.", mdkonline::translate_product($up_product)), - $product{$up_product}->{info_url} + $product{$up_product}{info_url} ); } else { @@ -153,10 +153,10 @@ sub add_medium_for_product { my ($product, $email, $passwd) = @_; my $error = 0; - my $arch = urpm::cfg::get_arch(); - my @archs = ($arch, if_($arch eq 'x86_64', 'i586')); + my $current_arch = urpm::cfg::get_arch(); + my @archs = ($current_arch, if_($current_arch eq 'x86_64', 'i586')); - for $arch (@archs) { + foreach my $arch (@archs) { unless ($product->{add_medium}->($email, $passwd, $up_version, $arch)) { $error = 1; interactive->vnew->ask_warn( |