Yenta/Conf.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 29 CC 3 SCAR 18.4
CC
3
Cov
0%
timet_to_yenta_version
12.0
timet_to_yenta_version_factor
2.0
BEGIN
2.0
CRAP 6.3
1 # -*- perl -*-
2  
3 # Copyright (c) 2009 AdCopy
4 # Author: Jeff Weisberg
5 # Created: 2009-Apr-13 12:34 (EDT)
6 # Function: defs
7 #
8 # $Id$
9  
10 package AC::Yenta::Conf;
11 use AC::Yenta::SixtyFour;
12 use AC::Import;
13 use strict;
14  
15 our @EXPORT = qw(timet_to_yenta_version_factor timet_to_yenta_version);
16  
17 my $TTVF = x64_one_million();
18  
19  
20 # deprecated
21 sub timet_to_yenta_version_factor {
22 return $TTVF;
23 }
24  
25 sub timet_to_yenta_version {
26 my $t = shift;
27  
28 return unless defined $t;
29 return $t * $TTVF unless ref $TTVF;
30  
31 # math::bigint does not like to multiply floats
32 my $ti = int $t;
33 my $tf = $t - $ti;
34  
35 return $ti * $TTVF + int($TTVF->numify() * $tf);
36 }
37  
38 1;