diff options
author | Francois Pons <fpons@mandriva.com> | 1999-10-11 17:04:31 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 1999-10-11 17:04:31 +0000 |
commit | 9ad846cd08f909f760f80bf703b8d4dbe1809c7b (patch) | |
tree | 0afede65ca0b4024e3738639c3661ddf2145f09e /perl-install/common.pm | |
parent | f3555a3ac7978f63ef42b4373da92ff1ce791031 (diff) | |
download | drakx-9ad846cd08f909f760f80bf703b8d4dbe1809c7b.tar drakx-9ad846cd08f909f760f80bf703b8d4dbe1809c7b.tar.gz drakx-9ad846cd08f909f760f80bf703b8d4dbe1809c7b.tar.bz2 drakx-9ad846cd08f909f760f80bf703b8d4dbe1809c7b.tar.xz drakx-9ad846cd08f909f760f80bf703b8d4dbe1809c7b.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index 2c9121e6e..c9366977f 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -63,6 +63,7 @@ sub bool2text { $_[0] ? "true" : "false" } sub text2bool { my $t = lc($_[0]); $t eq "true" || $t eq "yes" ? 1 : 0 } sub strcpy { substr($_[0], $_[2] || 0, length $_[1]) = $_[1] } sub cat_ { local *F; open F, $_[0] or $_[1] ? die "cat of file $_[0] failed: $!\n" : return; my @l = <F>; wantarray ? @l : join '', @l } +sub linkf { unlink $_[1]; link $_[0], $_[1] } sub symlinkf { unlink $_[1]; symlink $_[0], $_[1] } sub chop_ { map { my $l = $_; chomp $l; $l } @_ } sub divide { my $d = int $_[0] / $_[1]; wantarray ? ($d, $_[0] % $_[1]) : $d } |