summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-10-08 22:48:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-10-08 22:48:45 +0000
commit3a2974725a88f90678ca80ec5fed0cad8a7ae73f (patch)
tree78dc2f731d04199de3a78156562402cbc9066c44 /perl-install/common.pm
parentb96eaf258df93474108357edc2473a76f630bd52 (diff)
downloaddrakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.tar
drakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.tar.gz
drakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.tar.bz2
drakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.tar.xz
drakx-3a2974725a88f90678ca80ec5fed0cad8a7ae73f.zip
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index baa46e46a..6b56550ac 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -96,8 +96,8 @@ 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 }
sub round { int ($_[0] + 0.5) }
-sub round_up { my ($i, $r) = @_; $i += $r - ($i + $r - 1) % $r - 1; }
-sub round_down { my ($i, $r) = @_; $i -= $i % $r; }
+sub round_up { my ($i, $r) = @_; $i = int $i; $i += $r - ($i + $r - 1) % $r - 1; }
+sub round_down { my ($i, $r) = @_; $i = int $i; $i -= $i % $r; }
sub is_empty_array_ref { my $a = shift; !defined $a || @$a == 0 }
sub is_empty_hash_ref { my $a = shift; !defined $a || keys(%$a) == 0 }
sub difference2 { my %l; @l{@{$_[1]}} = (); grep { !exists $l{$_} } @{$_[0]} }