line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Convert::Temperature; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
32888
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1470
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
1
|
|
|
1
|
1
|
9
|
my $class = shift; |
10
|
1
|
|
|
|
|
4
|
my $self= bless {},$class; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
2
|
return $self; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub from_fahr_to_cel { |
16
|
1
|
|
|
1
|
1
|
694
|
my $self = shift; |
17
|
1
|
|
|
|
|
3
|
my $fahr = shift; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
7
|
$self->{'res_celsius'} = ($fahr -32) /1.8; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
3
|
return $self->{'res_celsius'}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub from_cel_to_fahr { |
25
|
1
|
|
|
1
|
1
|
731
|
my $self = shift; |
26
|
1
|
|
|
|
|
2
|
my $cel = shift; |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
9
|
$self->{'res_fahrenheit'} = $cel * 1.8 + 32; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
4
|
return $self->{'res_fahrenheit'}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub from_fahr_to_kelvin{ |
34
|
1
|
|
|
1
|
1
|
791
|
my $self = shift; |
35
|
1
|
|
|
|
|
3
|
my $fahr = shift; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
8
|
$self->{'res_kelvin'} = ($fahr + 459.67) / 1.8; |
38
|
|
|
|
|
|
|
|
39
|
1
|
|
|
|
|
6
|
return $self->{'res_kelvin'}; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub from_kelvin_to_fahr { |
43
|
1
|
|
|
1
|
1
|
575
|
my $self = shift; |
44
|
1
|
|
|
|
|
4
|
my $kelvin = shift; |
45
|
|
|
|
|
|
|
|
46
|
1
|
|
|
|
|
5
|
$self->{'res_kelvin'} = $kelvin * 1.8 - 459.67; |
47
|
|
|
|
|
|
|
|
48
|
1
|
|
|
|
|
4
|
return $self->{'res_kelvin'}; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub from_fahr_to_rankine { |
52
|
1
|
|
|
1
|
1
|
667
|
my $self = shift; |
53
|
1
|
|
|
|
|
3
|
my $fahr = shift; |
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
|
|
4
|
$self->{'res_rankine'} = $fahr + 459.67; |
56
|
|
|
|
|
|
|
|
57
|
1
|
|
|
|
|
3
|
return $self->{'res_rankine'}; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub from_rankine_to_fahr { |
61
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
62
|
0
|
|
|
|
|
|
my $rankine = shift; |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
$self->{'res_rak_fahr'} = $rankine - 459.67; |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
return $self->{'res_rak_fahr'}; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub from_fahr_to_reaumur { |
70
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
71
|
0
|
|
|
|
|
|
my $fahr = shift; |
72
|
|
|
|
|
|
|
|
73
|
0
|
|
|
|
|
|
$self->{'res_fahr_reamur'} = ($fahr - 32) / 2.25; |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
return $self->{'res_fahr_reamur'}; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub from_reaumur_to_fahr { |
79
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
80
|
0
|
|
|
|
|
|
my $reaumur = shift; |
81
|
|
|
|
|
|
|
|
82
|
0
|
|
|
|
|
|
$self->{'res_reaumur_fahr'} = $reaumur * 2.25 +32; |
83
|
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
|
return $self->{'res_reaumur_fahr'}; |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub extra { |
88
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
89
|
0
|
|
|
|
|
|
my $extra = "To my Mom. Maria Luisa Mesquista (1954 - 2007)"; |
90
|
|
|
|
|
|
|
|
91
|
0
|
|
|
|
|
|
$self->{'extra'} = $extra; |
92
|
0
|
|
|
|
|
|
return $self->{'extra'}; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
1; |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
__END__ |