File Coverage

lib/Perlmazing/Perlmazing/Precompile/decimals.pm
Criterion Covered Total %
statement 3 8 37.5
branch 0 2 0.0
condition 0 2 0.0
subroutine 1 2 50.0
pod n/a
total 4 14 28.5


line stmt bran cond sub pod time code
1 34     34   293 use Perlmazing qw(croak is_number);
  34         71  
  34         251  
2             sub main ($) {
3 0   0 0     my $value = shift || 0;
4 0 0         unless (is_number $value) {
5 0           croak "Use of non-numeric value in decimals()";
6             }
7 0           my $int = int $value;
8 0           return $value - $int;
9             }
10              
11             1;