line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Template::Plugin::Dot::Helpers::Number; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$HTML::Template::Plugin::Dot::Helpers::Number::VERSION = '0.06'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
59
|
|
7
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
47
|
|
8
|
2
|
|
|
2
|
|
9
|
use base qw/Number::Format/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
2654
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub format_price { |
11
|
3
|
|
|
3
|
1
|
2445
|
my $self = shift; |
12
|
3
|
100
|
66
|
|
|
23
|
return unless @_ and defined $_[0]; # suppress a warning in parent |
13
|
2
|
|
|
|
|
12
|
$self->SUPER::format_price(@_); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub equals |
17
|
|
|
|
|
|
|
{ |
18
|
0
|
|
|
0
|
1
|
0
|
return $_[1] == $_[2]; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub le |
22
|
|
|
|
|
|
|
{ |
23
|
0
|
|
|
0
|
1
|
0
|
return $_[1] <= $_[2]; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub lt |
27
|
|
|
|
|
|
|
{ |
28
|
1
|
|
|
1
|
1
|
2192
|
return $_[1] < $_[2]; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub ge |
32
|
|
|
|
|
|
|
{ |
33
|
0
|
|
|
0
|
1
|
0
|
return $_[1] >= $_[2]; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub gt |
37
|
|
|
|
|
|
|
{ |
38
|
2
|
|
|
2
|
1
|
2268
|
return $_[1] > $_[2]; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |