From ffbb0deecf7d5693ad149da3097e8e07b45ca514 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 12 Aug 2002 12:22:43 +0000 Subject: - modules::get_parameters : consolidate some code - harddrake::ui : uses it --- perl-install/modules.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'perl-install/modules.pm') diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 5ca25a855..e143ee5e1 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -8,7 +8,7 @@ use run_program; use log; use list_modules; -our %conf; +my %conf; sub category2modules_and_description { my ($categories) = @_; @@ -390,6 +390,14 @@ sub load_raw { } } +sub get_parameters { + my %conf; + foreach (split(' ', get_options($_[0]))) { + /(.*)=(.*)/; + $conf{$1} = $2; + }; + %conf; +} 1; -- cgit v1.2.1