Branch Coverage

blib/lib/WWW/BetfairNG.pm
Criterion Covered Total %
branch 66 194 34.0


line true false branch
101 3 8 if (@_)
103 1 2 unless (ref $params eq 'HASH')
107 1 3 unless (exists $self->{$key})
149 4 10 if (@_)
167 4 9 if (@_)
187 6 81 if (@_)
206 59 135 if (@_)
234 2 28 if (@_)
237 1 1 $flag ? :
238 2 0 unless ($self->{'p_check'} == $current_state)
239 1 1 $self->{'p_check'} ? :
264 0 0 if (@_)
267 0 0 $flag ? :
357 1 6 unless (@_)
362 1 5 unless (ref $params eq 'HASH')
366 2 3 unless ($params->{'username'} and $params->{'password'})
371 1 2 unless ($cert_file)
376 1 1 unless ($key_file)
381 1 0 unless $got_app_key
395 1 0 unless $got_app_key
396 1 0 unless ($response->{'success'})
401 0 0 unless ($self->{'response'}{'loginStatus'} eq 'SUCCESS')
423 1 3 unless (@_)
428 1 2 unless (ref $params eq 'HASH')
432 2 0 unless ($params->{'username'} and $params->{'password'})
437 0 0 unless $got_app_key
446 0 0 unless $got_app_key
447 0 0 unless ($response->{'success'})
452 0 0 unless ($self->{'response'}{'status'} eq 'SUCCESS')
471 1 0 unless ($self->session)
484 0 0 unless ($response->{'success'})
489 0 0 unless $content
491 0 0 unless ($self->{'response'}{'status'} eq 'SUCCESS')
512 1 1 unless ($self->session)
516 1 0 unless ($self->app_key)
525 0 0 unless ($response->{'success'})
530 0 0 unless $content
532 0 0 unless ($self->{'response'}{'status'} eq 'SUCCESS')
951 0 5 if ($result)
953 0 0 unless ($status eq 'SUCCESS')
955 0 0 if ($result->{'errorCode'})
1035 0 5 if ($result)
1037 0 0 unless ($status eq 'SUCCESS')
1039 0 0 if ($result->{'errorCode'})
1080 0 5 if ($result)
1082 0 0 unless ($status eq 'SUCCESS')
1084 0 0 if ($result->{'errorCode'})
1371 1 2 unless ($self->session)
1375 1 1 unless ($self->app_key)
1397 1 0 unless ($response->{'success'})
1402 0 0 unless $content
1494 46 46 unless ($self->session)
1498 21 25 unless ($self->app_key or $url =~ /DeveloperAppKeys/)
1502 0 25 unless (ref $params eq 'HASH')
1506 0 25 if ($self->check_parameters)
1509 0 0 unless $self->_check_parameter($caller, $params)
1517 21 4 unless ($url =~ /DeveloperAppKeys/)
1521 25 0 unless ($response->{'success'})
1522 25 0 if ($response->{'status'} == 400) { }
1535 0 0 unless $content
1550 3 2 unless ($self->session)
1554 2 0 unless ($self->app_key)
1558 0 0 unless (ref $params eq 'HASH')
1562 0 0 if ($self->check_parameters)
1564 0 0 unless $self->_check_parameter($method_name, $params)
1575 0 0 unless ($response->{'success'})
1576 0 0 if ($response->{'status'} == 400) { }
1589 0 0 unless $content
1591 0 0 if ($self->{'response'}{'error'})
1595 0 0 if ($self->{'response'}{'result'}) { }
1609 0 25 unless ($input)
1615 0 25 unless ($status)
1627 0 0 unless (exists $self->{'data_types'}{$name})
1632 0 0 if ($def->{'type'} eq 'HASH') { }
0 0 elsif ($def->{'type'} eq 'ARRAY') { }
0 0 elsif ($def->{'type'} eq 'ENUM') { }
0 0 elsif ($def->{'type'} eq 'SCALAR') { }
1633 0 0 unless (ref $parameter eq 'HASH')
1640 0 0 unless (exists $fields{$key})
1648 0 0 if ($key eq 'instructions')
1652 0 0 if ($key eq 'from' or $key eq 'to')
1653 0 0 if ($name eq 'transferFunds')
1657 0 0 unless ($self->_check_parameter($check_key, $value))
1663 0 0 if $fields{$_}[0] == 1
0 0 if (my(@missing) = grep({$fields{$_}[1] == 0 if $fields{$_}[0] == 1;} keys %fields))
1665 0 0 @missing == 1 ? :
1671 0 0 if (my(@repeated) = grep({$fields{$_}[1] > 1;} keys %fields))
1673 0 0 @repeated == 1 ? :
1680 0 0 unless (ref $parameter eq 'ARRAY')
1684 0 0 unless (@$parameter > 0)
1690 0 0 unless ($self->_check_parameter($key, $value))
1697 0 0 if (my $type = ref $parameter)
1700 0 0 $type eq 'array' ? :
1703 0 0 unless (grep {$_ eq $parameter;} @{$$def{'allowed'};})
1711 0 0 if (my $type = ref $parameter)
1714 0 0 $type eq 'array' ? :
1717 0 0 unless ($parameter =~ /$def->{'allowed'}/)