summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-16 13:08:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-16 13:08:32 +0000
commitcc29fc49a0427da3225c4d77f95827bed24073f7 (patch)
treefd86687bc4af7767098267052df70f9bff24d63b /perl-install/common.pm
parent30c83c5730279a3f2279b515c416a283e0c50d82 (diff)
downloaddrakx-backup-do-not-use-cc29fc49a0427da3225c4d77f95827bed24073f7.tar
drakx-backup-do-not-use-cc29fc49a0427da3225c4d77f95827bed24073f7.tar.gz
drakx-backup-do-not-use-cc29fc49a0427da3225c4d77f95827bed24073f7.tar.bz2
drakx-backup-do-not-use-cc29fc49a0427da3225c4d77f95827bed24073f7.tar.xz
drakx-backup-do-not-use-cc29fc49a0427da3225c4d77f95827bed24073f7.zip
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 9f7117254..441440033 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -7,7 +7,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int
@ISA = qw(Exporter);
%EXPORT_TAGS = (
common => [ qw(__ even odd min max sqr sum and_ or_ sign product bool invbool listlength bool2text text2bool to_int to_float ikeys member divide is_empty_array_ref is_empty_hash_ref add2hash add2hash_ set_new set_add round round_up round_down first second top uniq translate untranslate warp_text formatAlaTeX formatLines deref) ],
- functional => [ qw(fold_left compose map_index grep_index map_each grep_each map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie) ],
+ functional => [ qw(fold_left compose map_index grep_index map_each grep_each list2kv map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie) ],
file => [ qw(dirname basename touch all glob_ cat_ output symlinkf chop_ mode typeFromMagic) ],
system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInCsh substInFile availableRam availableMemory removeXiBSuffix template2file formatTime) ],
constant => [ qw($printable_chars $sizeof_int $bitof_int $SECTORSIZE) ],
@@ -129,6 +129,7 @@ sub grep_each(&%) {
while (($::a, $::b) = each %h) { $l{$::a} = $::b if &$f($::a, $::b) }
%l;
}
+sub list2kv { [ grep_index { even($::i) } @_ ], [ grep_index { odd($::i) } @_ ] }
#- pseudo-array-hash :)
sub map_tab_hash(&$@) {