summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-10-13 11:41:53 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-10-13 11:41:53 +0000
commit3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2 (patch)
treefbc6900f93a37f93731d0be67b95fa5a83928564 /perl-install/common.pm
parent5521ae98ce86e69166df6f72126bf0c300c069f4 (diff)
downloaddrakx-backup-do-not-use-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.tar
drakx-backup-do-not-use-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.tar.gz
drakx-backup-do-not-use-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.tar.bz2
drakx-backup-do-not-use-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.tar.xz
drakx-backup-do-not-use-3edbeac41e23ee13ff3e0c9c815c4ab93b279fd2.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 c9366977f..7a9bddc5d 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 sign product bool 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) ],
+ common => [ qw(__ even odd min max sqr sum 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) ],
functional => [ qw(fold_left compose map_index grep_index map_each grep_each map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie) ],
file => [ qw(dirname basename touch all glob_ cat_ symlinkf chop_ mode typeFromMagic) ],
system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ crypt_ getVarsFromSh setVarsInSh) ],
@@ -58,6 +58,7 @@ sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 }
sub dirname { @_ == 1 or die "usage: dirname <name>\n"; local $_ = shift; s|[^/]*/*\s*$||; s|(.)/*$|$1|; $_ || '.' }
sub basename { @_ == 1 or die "usage: basename <name>\n"; local $_ = shift; s|/*\s*$||; s|.*/||; $_ }
sub bool { $_[0] ? 1 : 0 }
+sub invbool { my $a = shift; $$a = !$$a; $$a }
sub listlength { scalar @_ }
sub bool2text { $_[0] ? "true" : "false" }
sub text2bool { my $t = lc($_[0]); $t eq "true" || $t eq "yes" ? 1 : 0 }