summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorThierry.Vignaud <thierry.vignaud@gmail.com>2014-05-28 22:37:23 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-05-28 22:37:23 +0200
commitdf74e103d8de6d7cc45cc3e2a99f4b9c8fff6085 (patch)
tree3ce05fa2bbad4d01d0df7a268abab40315b72e22 /perl-install/install
parentac656a1c73103b06962ab6199da16a8607528c19 (diff)
downloaddrakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar
drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar.gz
drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar.bz2
drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar.xz
drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.zip
simplify using member()
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/any.pm2
-rw-r--r--perl-install/install/media.pm4
2 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm
index 09f55f200..5187ebc78 100644
--- a/perl-install/install/any.pm
+++ b/perl-install/install/any.pm
@@ -225,7 +225,7 @@ sub ask_mirror {
sub ask_suppl_media_url {
my ($o, $method, $o_url) = @_;
- if ($method eq 'ftp' || $method eq 'http') {
+ if (member($method, qw(ftp http)) {
install::any::ask_mirror($o, 'distrib', $o_url);
} elsif ($method eq 'cdrom') {
'cdrom://';
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm
index 5857710a8..65cc1403e 100644
--- a/perl-install/install/media.pm
+++ b/perl-install/install/media.pm
@@ -167,7 +167,7 @@ sub stage2_phys_medium {
my $user = $ENV{LOGIN} && ($ENV{LOGIN} . ($ENV{PASSWORD} && ":$ENV{PASSWORD}") . '@');
$ENV{URLPREFIX} = "ftp://$user$ENV{HOST}/$ENV{PREFIX}";
}
- if ($method eq 'http' || $method eq 'ftp') {
+ if (member($method, qw(http ftp))) {
{ method => $method, url => $ENV{URLPREFIX} };
} elsif ($method =~ /(.*)-iso$/) {
my $dir_method = $1;
@@ -834,7 +834,7 @@ sub copy_rpms_on_disk {
sub _get_medium_dir {
my ($phys_m) = @_;
- if ($phys_m->{method} eq 'ftp' || $phys_m->{method} eq 'http' || $phys_m->{method} eq 'cdrom') {
+ if (member($phys_m->{method}, qw(ftp http cdrom))) {
$phys_m->{url};
} else {
"$phys_m->{mntpoint}$phys_m->{rel_path}";