diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-01-07 14:35:09 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-01-07 14:35:09 +0000 |
commit | bdce4328d7679af4d5e7f00e858b17f58cec5b40 (patch) | |
tree | 079a9e737873822fdacf80cc4601a2814c467802 /perl-install/common.pm | |
parent | 74bc44f61e05b3ff2aaa2632cf3560682c51cbf4 (diff) | |
download | drakx-bdce4328d7679af4d5e7f00e858b17f58cec5b40.tar drakx-bdce4328d7679af4d5e7f00e858b17f58cec5b40.tar.gz drakx-bdce4328d7679af4d5e7f00e858b17f58cec5b40.tar.bz2 drakx-bdce4328d7679af4d5e7f00e858b17f58cec5b40.tar.xz drakx-bdce4328d7679af4d5e7f00e858b17f58cec5b40.zip |
(may_apply): added
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index 20eac44ea..b22a623f9 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -6,7 +6,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int @ISA = qw(Exporter); %EXPORT_TAGS = ( - common => [ qw(__ even odd arch better_arch compat_arch min max sqr sum and_ or_ if_ sign product bool invbool listlength bool2text bool2yesno 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 next_val_in_array) ], + common => [ qw(__ may_apply even odd arch better_arch compat_arch min max sqr sum and_ or_ if_ sign product bool invbool listlength bool2text bool2yesno 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 next_val_in_array) ], functional => [ qw(fold_left compose mapgrep map_index grep_index find_index map_each grep_each list2kv map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie combine) ], file => [ qw(dirname basename touch all glob_ cat_ cat__ output symlinkf chop_ mode typeFromMagic expand_symlinks) ], system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInShMode setVarsInCsh substInFile availableMemory availableRamMB removeXiBSuffix template2file template2userfile update_userkderc list_skels formatTime formatTimeRaw unix2dos setVirtual isCdNotEjectable) ], @@ -136,6 +136,8 @@ sub expand_symlinks { $f; } +sub may_apply { $_[0] ? $_[0]->($_[1]) : (@_ > 2 ? $_[2] : $_[1]) } + sub if_($@) { my $b = shift; $b ? @_ : (); |