line |
true |
false |
branch |
16
|
1 |
9 |
unless $args{'method'} |
18
|
1 |
8 |
unless $args{'method'} =~ /\A(LIFO|FIFO|weighted average)\z/ |
23
|
1 |
7 |
if keys %args |
36
|
2 |
15 |
unless $units > 0 |
37
|
0 |
15 |
unless $unit_price >= 0 |
39
|
7 |
8 |
if (not @{$self->{'_inventory'};}) { } |
|
1 |
7 |
elsif (@{$self->{'_inventory'};} and $self->{'_inventory'}[-1][1] == $unit_price) { } |
|
2 |
5 |
elsif ($self->{'method'} eq 'weighted average') { } |
70
|
2 |
16 |
unless $units > 0 |
71
|
0 |
16 |
unless $unit_price >= 0 |
76
|
7 |
9 |
if ($self->{'_units'} < $units) |
77
|
4 |
3 |
if ($self->{'allow_negative_inventory'}) { } |
91
|
9 |
8 |
if ($self->{'method'} eq 'LIFO') { } |
97
|
6 |
11 |
if ($item->[0] > $remaining) { } |
102
|
0 |
6 |
if ($self->{'_units'} == 0) { } |
115
|
7 |
4 |
if ($self->{'method'} eq 'LIFO') { } |
125
|
6 |
5 |
if ($self->{'_units'} == 0) { } |
137
|
12 |
1 |
if (defined $orig_average_purchase_price) { } |