diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-01-16 23:08:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-01-16 23:08:46 +0000 |
commit | 3b9b604eb1802c5f546bd444dae32e179bbb7d20 (patch) | |
tree | b7b1cdf32f2e12fa65a932f24722e12a89b59bb3 /perl-install/common.pm | |
parent | cc29fc49a0427da3225c4d77f95827bed24073f7 (diff) | |
download | drakx-3b9b604eb1802c5f546bd444dae32e179bbb7d20.tar drakx-3b9b604eb1802c5f546bd444dae32e179bbb7d20.tar.gz drakx-3b9b604eb1802c5f546bd444dae32e179bbb7d20.tar.bz2 drakx-3b9b604eb1802c5f546bd444dae32e179bbb7d20.tar.xz drakx-3b9b604eb1802c5f546bd444dae32e179bbb7d20.zip |
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index 441440033..d6c602487 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 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) ], + common => [ qw(__ even odd arch 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 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) ], @@ -95,6 +95,13 @@ sub remove_spaces { local $_ = shift; s/^ +//; s/ +$//; $_ } sub mode { my @l = stat $_[0] or die "unable to get mode of file $_[0]: $!\n"; $l[2] } sub psizeof { length pack $_[0] } +sub arch() { + require Config; + Config->import; + no strict; + $Config{archname} =~ /(.*)-/ and $1; +} + sub touch { my ($f) = @_; unless (-e $f) { |