Branch Coverage

blib/lib/Travel/Status/DE/EFA.pm
Criterion Covered Total %
branch 36 128 28.1


line true false branch
32 0 0 if ($@)
43 0 0 if ($self->{'developer_mode'})
50 0 0 if ($self->{'errstr'})
75 0 2 if ($opt{'timeout'} <= 0)
79 0 2 unless ($opt{'coord'} or $opt{'name'} or $opt{'stopfinder'} or $opt{'stopseq'} or $opt{'from_json'})
89 0 2 if ($opt{'type'} and not $opt{'type'} =~ / ^ (?: stop | stopID | address | poi ) $ /x)
95 0 2 if ($opt{'service'})
96 0 0 if (my $service = Travel::Status::DE::EFA::Services::get_service($opt{'service'}))
100 0 0 if ($opt{'coord'}) { }
0 0 elsif ($opt{'stopfinder'}) { }
0 0 elsif ($opt{'stopseq'}) { }
113 0 0 unless ($service->{'tls_verify'})
116 0 0 if ($service->{'encoding'})
124 0 2 unless ($opt{'efa_url'})
132 0 2 if ($opt{'time'} and $opt{'time'} =~ / ^ (?<hour> \d\d? ) : (?<minute> \d\d ) $ /x) { }
0 2 elsif ($opt{'time'}) { }
144 0 2 if ($opt{'date'} and $opt{'date'} =~ / ^ (?<day> \d\d? ) [.] (?<month> \d\d? ) [.]
0 2 elsif ($opt{'date'}) { }
150 0 0 if ($+{'year'}) { }
187 0 2 if ($opt{'coord'}) { }
0 2 elsif ($opt{'stopfinder'}) { }
0 2 elsif ($opt{'stopseq'}) { }
242 0 2 $opt{'proximity_search'} ? :
246 0 2 if ($opt{'place'})
253 0 2 if ($opt{'full_routes'})
261 0 2 if ($opt{'user_agent'}) { }
266 0 2 if ($tls_insecure)
276 0 2 if ($self->{'cache'})
283 0 2 if ($opt{'async'})
287 0 2 if ($self->{'developer_mode'})
294 0 2 unless ($self->{'response'})
297 0 0 if ($error)
305 0 2 if ($self->{'developer_mode'})
320 0 0 if ($self->{'developer_mode'})
324 0 0 if ($cache)
326 0 0 if ($content)
327 0 0 if ($self->{'developer_mode'})
334 0 0 if ($self->{'developer_mode'})
340 0 0 if ($reply->is_error)
345 0 0 if ($cache)
357 0 0 if ($self->{'developer_mode'})
363 0 0 if ($cache)
365 0 0 if ($content)
366 0 0 if ($self->{'developer_mode'})
373 0 0 if ($self->{'developer_mode'})
377 0 0 if ($self->{'tls_insecure'})
384 0 0 if (my $err = $tx->error)
390 0 0 if ($cache)
416 1 0 if ($self->{'name_candidates'})
425 0 1 if ($self->{'place_candidates'})
441 1 1 if ($kv{'error'})
453 1 2 if ($json->{'departureList'})
458 2 2 if ($m->{'name'} eq "error" and $m->{'value'} eq "name list")
475 0 2 if ($m->{'name'} eq "error" and $m->{'value'} eq "place list")
499 0 0 if ($self->{'stop'})
520 0 0 if ($self->{'stops'})
526 0 0 if (ref $stops eq "HASH")
551 0 0 if ($self->{'infos'})
568 0 1 if ($self->{'lines'})
600 0 2 if ($self->{'results'})
604 0 2 if ($self->{'post'}{'coord'}) { }
0 2 elsif ($self->{'post'}{'name_sf'}) { }
646 0 0 if (ref $json->{'stopFinder'}{'points'} eq "HASH" and exists $json->{'stopFinder'}{'points'}{'point'})
675 0 2 if ($json->{'departureList'} and ref $json->{'departureList'} eq "HASH")