Condition Coverage

blib/lib/Tesla/API.pm
Criterion Covered Total %
condition 17 32 53.1


and 3 conditions

line !l l&&!r l&&r condition
95 1 0 0 defined $id and $id =~ /^\d+$/

or 2 conditions

line l !l condition
149 1 1 $self->{'api_cache_persist'} // 0
159 3 1 $self->{'api_cache_time'} // 2
300 1 2 $self->{'useragent_string'} // "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0"
312 5 2 $self->{'useragent_timeout'} // 180
483 0 0 $self->{'api_attempts'} || 0
490 5 1 $params{'id'} // 0
515 10 1 $self->{'authentication_cache_file'} || '/root/tesla_auth_cache.json'

or 3 conditions

line l !l&&r !l&&!r condition
103 0 0 0 $self->api_cache_persist or $self->api_cache_time
106 0 0 0 $self->api_cache_persist or time - $cache->{'time'} <= $self->api_cache_time
164 19 0 2 not $self->{'endpoints'} or $self->{'reset_data'}
412 0 0 5 not defined $token_data or ref $token_data ne "HASH"
464 0 0 2 not defined $token_data or ref $token_data ne "HASH"