From 038e2b5d78e9acf85b9fcbb9691681fb7e0f1d86 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 20 Jan 2004 11:59:35 +0000 Subject: simpkify %toreplace build --- perl-install/network/modem.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index 54e07e98d..4c2b240e2 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -18,8 +18,7 @@ sub ppp_configure { any::devfssymlinkf($modem, 'modem') if $modem->{device} ne "/dev/modem"; - my %toreplace; - $toreplace{$_} = $modem->{$_} foreach qw(connection phone login passwd auth domain dns1 dns2); + my %toreplace = map { $_ => $modem->{$_} } qw(connection phone login passwd auth domain dns1 dns2); $toreplace{kpppauth} = ${{ 'Script-based' => 0, 'PAP' => 1, 'Terminal-based' => 2, }}{$modem->{auth}}; $toreplace{kpppauth} = ${{ 'Script-based' => 0, 'PAP' => 1, 'Terminal-based' => 2, 'CHAP' => 3 }}{$modem->{auth}}; $toreplace{phone} =~ s/[a-zA-Z]//g; -- cgit v1.2.1