diff options
author | James Raspass <jraspass@gmail.com> | 2022-01-25 10:34:52 +0000 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-02-17 17:47:57 -0700 |
commit | 362ab35b76c7bd2d3a74d2be2de0d5865aed2e52 (patch) | |
tree | 551d1275df3ad591099cdbe0c6048622a995cf23 | |
parent | 8db33c992cc09f42dad0dc472cd49fb6b7538d0e (diff) | |
download | perl-362ab35b76c7bd2d3a74d2be2de0d5865aed2e52.tar.gz |
Tie::SubstrHash - Replace sub ceil with builtin::ceil
-rw-r--r-- | lib/Tie/SubstrHash.pm | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Tie/SubstrHash.pm b/lib/Tie/SubstrHash.pm index 084c3c2ff1..cd2e99b771 100644 --- a/lib/Tie/SubstrHash.pm +++ b/lib/Tie/SubstrHash.pm @@ -176,13 +176,6 @@ sub rehash { $hash -= $tsize->[1] if $hash >= $tsize->[1]; } -# using POSIX::ceil() would be too heavy, and not all platforms have it. -sub ceil { - my $num = shift; - $num = int($num + 1) unless $num == int $num; - return $num; -} - # See: # # http://www-groups.dcs.st-andrews.ac.uk/~history/HistTopics/Prime_numbers.html @@ -191,7 +184,7 @@ sub ceil { sub findgteprime { # find the smallest prime integer greater than or equal to use integer; - my $num = ceil(shift); + my $num = builtin::ceil(shift); return 2 if $num <= 2; $num++ unless $num % 2; |