From df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085 Mon Sep 17 00:00:00 2001 From: "Thierry.Vignaud" Date: Wed, 28 May 2014 22:37:23 +0200 Subject: simplify using member() --- perl-install/install/media.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install/install/media.pm') 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}"; -- cgit v1.2.1