| 1 | package HTML::Template::Plugin::Dot::Helpers::Number; | ||||||||||||||||||||||||||||
| 2 | { | ||||||||||||||||||||||||||||
| 3 | 3 | $HTML::Template::Plugin::Dot::Helpers::Number::VERSION = '0.06'; | |||||||||||||||||||||||||||
| 4 | } | ||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 3 | ▶ | use base qw/Number::Format/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | sub format_price { | ||||||||||||||||||||||||||||
| 11 | 3 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
format_price: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 12 | 3 | ▶ | return unless @_ and defined $_[0]; # suppress a warning in parent | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@_ and defined $_[0]
MC/DC50%1/2
@_ and defined $_[0]
@_
defined $_[0]
Truth table66%2/3
A and B
A= @_B= defined $_[0]
| |||||||||||||||||||||||||||||
| 13 | 2 | $self->SUPER::format_price(@_); | |||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | sub equals | ||||||||||||||||||||||||||||
| 17 | { | ||||||||||||||||||||||||||||
| 18 | 0 | ▶ | return $_[1] == $_[2]; | ||||||||||||||||||||||||||
|
Subroutine
equals: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | sub le | ||||||||||||||||||||||||||||
| 22 | { | ||||||||||||||||||||||||||||
| 23 | 0 | ▶ | return $_[1] <= $_[2]; | ||||||||||||||||||||||||||
|
Subroutine
le: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | sub lt | ||||||||||||||||||||||||||||
| 27 | { | ||||||||||||||||||||||||||||
| 28 | 1 | ▶ | return $_[1] < $_[2]; | ||||||||||||||||||||||||||
|
Subroutine
lt: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | sub ge | ||||||||||||||||||||||||||||
| 32 | { | ||||||||||||||||||||||||||||
| 33 | 0 | ▶ | return $_[1] >= $_[2]; | ||||||||||||||||||||||||||
|
Subroutine
ge: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | sub gt | ||||||||||||||||||||||||||||
| 37 | { | ||||||||||||||||||||||||||||
| 38 | 2 | ▶ | return $_[1] > $_[2]; | ||||||||||||||||||||||||||
|
Subroutine
gt: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | 3 | 1; | |||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | __END__ | ||||||||||||||||||||||||||||