diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-07-24 10:49:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-07-24 10:49:46 +0000 |
commit | 916ae6acd4bd90da774693e0030f560e1af1b773 (patch) | |
tree | 39080a0128dd3d34cf9b92c0ab7d7f421d950a44 /perl-install/services.pm | |
parent | 7e5672eb837597a08dc886dc022f704be9b97665 (diff) | |
download | drakx-916ae6acd4bd90da774693e0030f560e1af1b773.tar drakx-916ae6acd4bd90da774693e0030f560e1af1b773.tar.gz drakx-916ae6acd4bd90da774693e0030f560e1af1b773.tar.bz2 drakx-916ae6acd4bd90da774693e0030f560e1af1b773.tar.xz drakx-916ae6acd4bd90da774693e0030f560e1af1b773.zip |
removed/renamed unused/seldom-used functions
Diffstat (limited to 'perl-install/services.pm')
-rw-r--r-- | perl-install/services.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm index 7d24d389e..9b05474f8 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -269,7 +269,17 @@ sub services { my ($prefix) = @_; my $cmd = $prefix && !$::testing ? "chroot $prefix" : ""; my @l = map { [ /([^\s:]+)/, /\bon\b/ ] } grep { !/:$/ } sort `LANGUAGE=C $cmd /sbin/chkconfig --list`; - [ map { $_->[0] } @l ], [ mapgrep { $_->[1], $_->[0] } @l ]; + [ map { $_->[0] } @l ], [ map { $_->[0] } grep { $_->[1] } @l ]; +} + +sub mapgrep(&@) { + my $f = shift; + my @l; + foreach (@_) { + my ($b, $v) = $f->($_); + push @l, $v if $b; + } + @l; } 1; |