summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-03-08 17:21:57 +0000
committerdamien <damien@mandriva.com>2001-03-08 17:21:57 +0000
commit163345724ccd7627285a0ea3cad8b1de6abe76d8 (patch)
tree23627476ca76ce6fc752097e8ff404fc70d33c80 /perl-install/common.pm
parent2c1852faef5b6d5a769619b1c1b902d4f404aa91 (diff)
downloaddrakx-backup-do-not-use-163345724ccd7627285a0ea3cad8b1de6abe76d8.tar
drakx-backup-do-not-use-163345724ccd7627285a0ea3cad8b1de6abe76d8.tar.gz
drakx-backup-do-not-use-163345724ccd7627285a0ea3cad8b1de6abe76d8.tar.bz2
drakx-backup-do-not-use-163345724ccd7627285a0ea3cad8b1de6abe76d8.tar.xz
drakx-backup-do-not-use-163345724ccd7627285a0ea3cad8b1de6abe76d8.zip
added if__
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 0968422bd..043c30de6 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(__ 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_ put_in_hash 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_ 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_ put_in_hash 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 formatXiB template2file template2userfile update_userkderc list_skels formatTime formatTimeRaw unix2dos setVirtual isCdNotEjectable) ],
@@ -145,7 +145,12 @@ sub if_($@) {
wantarray || @_ <= 1 or die "if_ called in scalar context with more than one argument";
wantarray ? @_ : $_[0];
}
-
+sub if__($@) {
+ my $b = shift;
+ defined $b or return ();
+ wantarray || @_ <= 1 or die "if_ called in scalar context with more than one argument";
+ wantarray ? @_ : $_[0];
+}
sub arch() {
require c;
c::kernel_arch();