diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-09-22 10:03:11 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-09-22 10:03:11 +0000 |
commit | 6c6b0c04958b2528e4902d7588da0067eeeed6a8 (patch) | |
tree | 3783d7efefd5c5a1b2cfd454fead28118a010760 /perl-install | |
parent | d22779aee15234c1273285bc35dfb0ce7a2b373c (diff) | |
download | drakx-6c6b0c04958b2528e4902d7588da0067eeeed6a8.tar drakx-6c6b0c04958b2528e4902d7588da0067eeeed6a8.tar.gz drakx-6c6b0c04958b2528e4902d7588da0067eeeed6a8.tar.bz2 drakx-6c6b0c04958b2528e4902d7588da0067eeeed6a8.tar.xz drakx-6c6b0c04958b2528e4902d7588da0067eeeed6a8.zip |
add parse_file_modules helper
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/modalias.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/modalias.pm b/perl-install/modalias.pm index 6ae09b9cc..516a2dd01 100644 --- a/perl-install/modalias.pm +++ b/perl-install/modalias.pm @@ -59,6 +59,17 @@ sub parse_path { } } +sub parse_file_modules { + my ($path) = @_; + my %modules; + foreach (cat_($path)) { + if (my ($alias, undef, $module) = $_ =~ $alias_re) { + push @{$modules{$module}}, $alias; + } + } + \%modules; +} + sub get_alias_groups() { @alias_groups = map { my $group = {}; |