Branch Coverage

lib/Finance/IG.pm
Criterion Covered Total %
branch 1 306 0.3


line true false branch
128 0 1 if (eval 'require Term::Chrome') { }
193 0 0 if $self->isdemo
235 0 0 if $code != 200
263 0 0 if ref $hash ne "ARRAY"
264 0 0 if ref $toflatten ne "ARRAY"
270 0 0 if (exists $h->{$key})
272 0 0 if (defined $h->{$key})
274 0 0 if ref $h->{$key} ne "HASH"
277 0 0 if exists $h->{$subkey}
299 0 0 if (ref $to eq "Time::Piece")
303 0 0 if (ref $from eq "Time::Piece")
307 0 0 unless $to =~ /^[-0-9T:]*$/
308 0 0 unless $from =~ /^[-0-9T:]*$/
324 0 0 if $from
325 0 0 if $to
327 0 0 if $pageNumber
328 0 0 if $pageSize
330 0 0 $_ ? :
332 0 0 if $url
341 0 0 if ($code == 200) { }
350 0 0 if $rpage > $resp->{'metadata'}{'pageData'}{'pageNumber'}
386 0 0 if (ref $to eq "Time::Piece")
390 0 0 if (ref $from eq "Time::Piece")
395 0 0 unless $to =~ /^[-0-9T:]*$/
396 0 0 unless $from =~ /^[-0-9T:]*$/
411 0 0 if $from ne ""
412 0 0 if $to ne ""
413 0 0 if ($detailed) { }
422 0 0 if $pageNumber
424 0 0 if $pageSize
429 0 0 $_ ? :
431 0 0 if $url
444 0 0 if ($code == 200) { }
448 0 0 if @activities == 0
862 0 0 if $position->{'direction'} eq "SELL"
867 0 0 unless $position->{'held'} = "Time::Piece"->strptime($position->{'createdDateUTC'}, "%Y-%m-%dT%H:%M:%S")
872 0 0 if exists $position->{'held'} and $position->{'held'} > 0
898 0 0 unless $h = "Time::Piece"->strptime($subtotal->{'createdDateUTC'}, "%Y-%m-%dT%H:%M:%S")
910 0 0 if $subtotal->{'stopLevel'}
918 0 0 if @$total > 1
922 0 0 if $position->{'level'} > 0
931 0 0 $_ ? :
1000 0 0 if $position->{'direction'} eq "SELL"
1010 0 0 unless $position->{'held'} = "Time::Piece"->strptime($position->{'createdDateUTC'}, "%Y-%m-%dT%H:%M:%S")
1014 0 0 if $position->{'held'} > 0
1060 0 0 if $key =~ s/^-//
1062 0 0 unless exists $Finance::IG::a->{$key} and exists $Finance::IG::b->{$key}
1065 0 0 if $key eq "held"
1070 0 0 if ($x1 eq $x1 + 0 and $x2 eq $x2 + 0) { }
1082 0 0 if $result
1170 0 0 if ($ms ne "TRADEABLE")
1194 0 0 if ($code == 200) { }
1199 0 0 if (defined $dealReference and length $dealReference > 5)
1213 0 0 if $done
1214 0 0 if $notdone
1313 0 0 if (exists $existhash{$epic})
1323 0 0 if ($wantedsize <= 0)
1330 0 0 if ($ms ne "TRADEABLE" and not $ignoretradeable)
1354 0 0 if ($code == 200)
1360 0 0 if (defined $dealReference and length $dealReference > 5)
1369 0 0 if $done
1370 0 0 if $notdone
1445 0 0 if (ref $to eq "Time::Piece")
1449 0 0 if (ref $from eq "Time::Piece")
1471 0 0 if $resolution eq "1d"
1472 0 0 if $resolution eq "1h"
1473 0 0 if $resolution eq "1h"
1474 0 0 if $resolution eq "2h"
1475 0 0 if $resolution eq "3h"
1476 0 0 if $resolution eq "1m"
1477 0 0 if $resolution eq "2m"
1478 0 0 if $resolution eq "3m"
1479 0 0 if $resolution eq "5m"
1480 0 0 if $resolution eq "10m"
1481 0 0 if $resolution eq "15m"
1482 0 0 if $resolution eq "30m"
1483 0 0 if $resolution eq "1s"
1484 0 0 if $resolution eq "1w"
1485 0 0 if $resolution eq "1M"
1488 0 0 if defined $resolution and 0 == grep({$resolution eq $_;} "DAY", "HOUR", "HOUR_2", "HOUR_3", "HOUR_4", "MINUTE", "MINUTE_10", "MINUTE_15", "MINUTE_2", "MINUTE_3", "MINUTE_30", "MINUTE_5", "MONTH", "SECOND", "WEEK")
1511 0 0 if $url
1592 0 0 if $fudebug
1595 0 0 if $fudebug
1596 0 0 if ref $item eq ""
1597 0 0 if (ref $item eq "HASH")
1599 0 0 if $fudebug
1602 0 0 if $fudebug
1603 0 0 if (ref $item->{$key} eq "HASH")
1607 0 0 if $fudebug
1609 0 0 if $fudebug
1612 0 0 if (ref $item->{$key}{$key2} eq "HASH")
1616 0 0 if $fudebug
1618 0 0 if $fudebug
1620 0 0 if $fudebug
1625 0 0 if $fudebug
1628 0 0 if (ref $item->{$key} eq "ARRAY")
1630 0 0 if $fudebug
1638 0 0 if (ref $item eq "ARRAY")
1640 0 0 if $fudebug
1647 0 0 if $fudebug
1681 0 0 if ref $position ne "HASH"
1682 0 0 unless defined $item
1686 0 0 if (exists $position->{$item}) { }
0 0 elsif (exists $p->{$item}) { }
0 0 elsif (exists $m->{$item}) { }
1756 0 0 if $code != 200
1765 0 0 if @wantedmarkets == 0
1766 0 0 if @wantedmarkets != 1
1816 0 0 unless open F, $f
1826 0 0 if (/\|/) { }
0 0 elsif (/^Name/) { }
0 0 elsif (/^Total/) { }
1859 0 0 if ($writenewfile)
1862 0 0 unless (-e $f)
1864 0 0 unless open my $g, ">", $f
1911 0 0 unless open F, $f
1922 0 0 if (/^Total/) { }
0 0 elsif (/ Positions$/) { }
0 0 elsif (/^ *$/) { }
0 0 elsif (/#/) { }
0 0 elsif (not /\|/) { }
0 0 elsif (/Epic/) { }
1952 0 0 unless defined $names[0]
1960 0 0 if $debug
2030 0 0 if $out eq "stdout"
2032 0 0 if defined $up and ref $up eq "" and not defined $down
2034 0 0 if (defined $up and ref $up ne "CODE")
2042 0 0 if defined $up and $v1 > $up
2043 0 0 if defined $down and $v1 < $down
2044 0 0 if defined $up and $v1 > $up * 5
2045 0 0 if defined $down and $v1 < 5 * $down
2049 0 0 if defined $up and ref $up eq "CODE"
2050 0 0 unless defined $up
2054 0 0 if (ref $position eq "ARRAY")
2062 0 0 if abs $2 > abs $x
2081 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2084 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2089 0 0 if (not defined $position or $position eq "")
2106 0 0 if $2 > $x
2114 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2116 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2148 0 0 if $len
2149 0 0 if (defined $item and $item ne '' and exists $position->{$item} and defined $position->{$item}) { }
0 0 elsif (defined $self->fetch($position, $item)) { }
2154 0 0 if ($item eq "dbid" and exists $INC{'Term/Chrome.pm'} and $self->col)
2172 0 0 if ($item eq "dbid" and defined $INC{'Term/Chrome.pm'} and $self->col)
2200 0 0 if ($len ne "")
2203 0 0 if $len ne ""
2204 0 0 if $len and $len < length $s and $len >= 1
2210 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2216 0 0 if (ref $col ne "")
2247 0 0 if @dates == 0
2248 0 0 if @dates == 1