blib/lib/Tesla/API.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 34 | 46 | 73.9 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
95 | 1 | 0 | 0 | defined $id and $id =~ /^\d+$/ |
197 | 6 | 0 | 4 | $self->{'mech'} and not $self->{'mech_reset'} |
line | l | !l | condition |
---|---|---|---|
101 | 0 | 5 | $id //= 0 |
155 | 8 | 9 | $self->{'api_cache_persist'} // 0 |
165 | 10 | 5 | $self->{'api_cache_time'} // 2 |
326 | 1 | 7 | $self->{'useragent_string'} // "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0" |
339 | 5 | 7 | $self->{'useragent_timeout'} // 180 |
515 | 11 | 5 | $self->{'api_attempts'} || 0 |
522 | 13 | 1 | $params{'id'} // 0 |
547 | 10 | 1 | $self->{'authentication_cache_file'} || '/root/tesla_auth_cache.json' |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
43 | 1 | 27 | 0 | $ENV{'TESLA_API_ENDPOINTS_FILE'} // dist_file("Tesla-API", "endpoints.json") |
1 | 27 | 0 | $ENV{'TESLA_API_OPTIONCODES_FILE'} // dist_file("Tesla-API", "option_codes.json") | |
105 | 2 | 3 | 0 | $self->api_cache_persist or $self->api_cache_time |
108 | 1 | 1 | 0 | $self->api_cache_persist or time - $cache->{'time'} <= $self->api_cache_time |
170 | 28 | 2 | 15 | not $self->{'endpoints'} or $self->{'reset_endpoints_data'} |
216 | 2 | 1 | 1162 | not $self->{'option_codes'} or $self->{'reset_option_codes_data'} |
439 | 0 | 0 | 5 | not defined $token_data or ref $token_data ne "HASH" |
491 | 0 | 0 | 2 | not defined $token_data or ref $token_data ne "HASH" |