Branch Coverage

lib/Finance/IG.pm
Criterion Covered Total %
branch 1 298 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
865 0 0 unless $position->{'held'} = 'Time::Piece'->strptime($position->{'createdDateUTC'}, '%Y-%m-%dT%H:%M:%S')
892 0 0 unless $h = 'Time::Piece'->strptime($subtotal->{'createdDateUTC'}, '%Y-%m-%dT%H:%M:%S')
904 0 0 if $subtotal->{'stopLevel'}
912 0 0 if @$total > 1
917 0 0 if $position->{'level'} > 0
926 0 0 $_ ? :
995 0 0 if $position->{'direction'} eq 'SELL'
1005 0 0 unless $position->{'held'} = 'Time::Piece'->strptime($position->{'createdDateUTC'}, '%Y-%m-%dT%H:%M:%S')
1009 0 0 if $position->{'held'} > 0
1055 0 0 if $key =~ s/^-//
1057 0 0 unless exists $Finance::IG::a->{$key} and exists $Finance::IG::b->{$key}
1064 0 0 if ($x1 eq $x1 + 0 and $x2 eq $x2 + 0) { }
1073 0 0 if $result
1161 0 0 if ($ms ne 'TRADEABLE')
1185 0 0 if ($code == 200) { }
1190 0 0 if (defined $dealReference and length $dealReference > 5)
1204 0 0 if $done
1205 0 0 if $notdone
1304 0 0 if (exists $existhash{$epic})
1314 0 0 if ($wantedsize <= 0)
1321 0 0 if ($ms ne 'TRADEABLE' and not $ignoretradeable)
1345 0 0 if ($code == 200)
1351 0 0 if (defined $dealReference and length $dealReference > 5)
1360 0 0 if $done
1361 0 0 if $notdone
1436 0 0 if (ref $to eq 'Time::Piece')
1440 0 0 if (ref $from eq 'Time::Piece')
1462 0 0 if $resolution eq '1d'
1463 0 0 if $resolution eq '1h'
1464 0 0 if $resolution eq '1h'
1465 0 0 if $resolution eq '2h'
1466 0 0 if $resolution eq '3h'
1467 0 0 if $resolution eq '1m'
1468 0 0 if $resolution eq '2m'
1469 0 0 if $resolution eq '3m'
1470 0 0 if $resolution eq '5m'
1471 0 0 if $resolution eq '10m'
1472 0 0 if $resolution eq '15m'
1473 0 0 if $resolution eq '30m'
1474 0 0 if $resolution eq '1s'
1475 0 0 if $resolution eq '1w'
1476 0 0 if $resolution eq '1M'
1479 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')
1502 0 0 if $url
1583 0 0 if $fudebug
1586 0 0 if $fudebug
1587 0 0 if ref $item eq ''
1588 0 0 if (ref $item eq 'HASH')
1590 0 0 if $fudebug
1593 0 0 if $fudebug
1594 0 0 if (ref $item->{$key} eq 'HASH')
1598 0 0 if $fudebug
1600 0 0 if $fudebug
1603 0 0 if (ref $item->{$key}{$key2} eq 'HASH')
1607 0 0 if $fudebug
1609 0 0 if $fudebug
1611 0 0 if $fudebug
1616 0 0 if $fudebug
1619 0 0 if (ref $item->{$key} eq 'ARRAY')
1621 0 0 if $fudebug
1629 0 0 if (ref $item eq 'ARRAY')
1631 0 0 if $fudebug
1638 0 0 if $fudebug
1672 0 0 if ref $position ne 'HASH'
1673 0 0 unless defined $item
1677 0 0 if (exists $position->{$item}) { }
0 0 elsif (exists $p->{$item}) { }
0 0 elsif (exists $m->{$item}) { }
1747 0 0 if $code != 200
1756 0 0 if @wantedmarkets == 0
1757 0 0 if @wantedmarkets != 1
1807 0 0 unless open F, $f
1817 0 0 if (/\|/) { }
0 0 elsif (/^Name/) { }
0 0 elsif (/^Total/) { }
1850 0 0 if ($writenewfile)
1853 0 0 unless (-e $f)
1855 0 0 unless open my $g, '>', $f
1901 0 0 unless open F, $f
1912 0 0 if (/^Total/) { }
0 0 elsif (/ Positions$/) { }
0 0 elsif (/^ *$/) { }
0 0 elsif (/#/) { }
0 0 elsif (not /\|/) { }
0 0 elsif (/Epic/) { }
1942 0 0 unless defined $names[0]
2019 0 0 if $out eq 'stdout'
2021 0 0 if defined $up and ref $up eq '' and not defined $down
2023 0 0 if (defined $up and ref $up ne 'CODE')
2031 0 0 if defined $up and $v1 > $up
2032 0 0 if defined $down and $v1 < $down
2033 0 0 if defined $up and $v1 > $up * 5
2034 0 0 if defined $down and $v1 < 5 * $down
2038 0 0 if defined $up and ref $up eq 'CODE'
2039 0 0 unless defined $up
2043 0 0 if (ref $position eq 'ARRAY')
2051 0 0 if abs $2 > abs $x
2070 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2073 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2078 0 0 if (not defined $position or $position eq '')
2095 0 0 if $2 > $x
2103 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2105 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2137 0 0 if $len
2138 0 0 if (defined $item and $item ne '' and exists $position->{$item} and defined $position->{$item}) { }
0 0 elsif (defined $self->fetch($position, $item)) { }
2143 0 0 if ($item eq 'dbid' and exists $INC{'Term/Chrome.pm'} and $self->col)
2161 0 0 if ($item eq 'dbid' and defined $INC{'Term/Chrome.pm'} and $self->col)
2189 0 0 if ($len ne '')
2192 0 0 if $len ne ''
2193 0 0 if $len and $len < length $s and $len >= 1
2199 0 0 if $self->col and defined $INC{'Term/Chrome.pm'}
2204 0 0 if (ref $col ne '')
2235 0 0 if @dates == 0
2236 0 0 if @dates == 1