Condition Coverage

blib/lib/Astro/SpaceTrack.pm
Criterion Covered Total %
condition 86 212 40.5


and 3 conditions

line !l l&&!r l&&r condition
779 0 0 0 "" ne $user and "" ne $pass
1066 100 0 0 defined $datum->{'SPADOC_CD'} and $datum->{'SPADOC_CD'} eq "ALL"
1403 1 1 0 $opt->{'rms'} and $opt->{'match'}
1491 4 0 0 $format eq "JSON" and $self->getv("pretty")
1847 0 0 1 @args and defined $args[0]
2427 132 0 58 $rslt{$body->[0]} and $body->[4] != 3
2620 0 0 0 $rslt->{$oid} and not $body->{'DECAY'}
2768 0 0 2 $self->{'username'} and $self->{'password'}
3187 38 0 0 $opt->{'status'} and $opt->{'status'} ne "onorbit"
3349 5 0 0 wantarray and $data
4032 1 0 0 $self->{'banner'} and not $self->{'filter'}
4114 0 0 1 $verb ne "new" and $verb ne "shell"
0 0 1 $verb ne "new" and $verb ne "shell" and not $verb =~ / \A _ [^_] /msx
4138 1 0 0 $verb eq "get" and @cmdarg == 0
4179 1 0 0 $interactive and not $self->{'filter'}
4340 0 1 4 defined $catalog and my $info = $catalogs{'spacetrack'}[2]{$catalog}
4536 47 0 0 $self->{'pretty'} and _find_rest_arg_value(\@args, "format", "json") eq "json"
4551 0 1 0 "query" eq $kind and $tle_class{$class}
4817 0 0 54 defined $content and $content ne ""
4822 32 21 1 $context->{'opt'}{'file'} and $data
4836 0 0 0 defined $datum->{'FILE'} and $datum->{'FILE'} > $context->{'file'}
4997 0 0 2 $version == 2 and not defined $expires
5029 0 1 46 defined $interface_info->{'cookie_expires'} && $interface_info->{'cookie_expires'} > time
5170 0 0 0 $self->{'dump_headers'} & 32 and 61 < length $content
5416 0 0 6 defined $arg{'catalog'} and $catalogs{$method}
0 0 6 defined $arg{'catalog'} and $catalogs{$method} and $info = $catalogs{$method}{$arg{'catalog'}}
5487 0 0 12 $resp->is_success and defined $arg{'post_process'}
5715 20 0 0 $value and my $identity = __spacetrack_identity()
5834 0 0 2 $value =~ / \A \d+ \z /msx and $self->{'_space_track_interface'}[$value]
6121 92 1 1 $opt->{'json'} and defined $opt->{'format'}
93 1 0 $opt->{'json'} and defined $opt->{'format'} and $opt->{'format'} ne "json"
6261 0 38 12 $opt->{'exclude'} and @{$opt->{'exclude'};}
6270 0 49 1 $opt->{'include'} and @{$opt->{'include'};}
6407 0 0 0 $text =~ / \A - /msx and my $code = $app->can("_${cmd}_opts")
6445 0 0 0 defined $text and $text ne ""
6476 0 0 0 1 == @rslt and $rslt[0] =~ / \W \z /msx

or 2 conditions

line l !l condition
962 0 1 $self->{'addendum'} || ''
2464 62 0 $kelso_comment{$status} || ''
3180 38 0 $rest_sort_map{$opt->{'sort'} or 'catnum'} || 'OBJECT_NUMBER'
4048 0 0 eval { do { $self->_get_readline($stdout) } } || sub { print {$stdout;} $self->getv('prompt'); return readline STDIN; }
4104 0 0 $@ || 'An unknown error occurred'
4188 0 0 $rdln->OUT || \*STDOUT
4801 83 0 'Astro::SpaceTrack'->can("_accumulate_${name}_data") || \&Astro::SpaceTrack::_accumulate_unknown_data
4807 63 20 'Astro::SpaceTrack'->can("_accumulate_${name}_return") || sub { my(undef, $context) = @_; return $context->{'data'}; }
4808 33 50 $opt || {}
4932 31 1 $context->{'data'} ||= []
5689 0 0 $id_file_name{$^O} || sub { return join('/', $ENV{'HOME'}, '.spacetrack-identity'); }
6310 9 41 $opt->{'status'} ||= "onorbit"
6318 13 87 $opt->{$key} ||= []

or 3 conditions

line l !l&&r !l&&!r condition
934 0 1 0 $perl_version ||= do { $] >= "5.01" ? $^V : do { require Config; "v" . $Config::Config{'version'} } }
1082 0 0 0 $data ||= $self->_get_json_object->decode($resp->content)
1408 1 0 1 $opt->{'rms'} or $opt->{'match'}
1424 3 1 0 not $opt->{$key} or $info->{$key}
1968 0 1 0 $self->can("_get_attr_$name") || $self->can('getv')
2412 2 0 0 not $opt->{'raw'} or $ignore_raw{$fmt}
2565 29 0 0 $sladen_interpret_detail{$detail} || $sladen_interpret_detail{''}
3128 22 13 0 $resp->is_success or $resp->code == 418
3172 5 0 33 $opt->{'start_epoch'} or $opt->{'end_epoch'}
3285 45 5 0 $opt->{'tle'} or "legacy" eq $opt->{'format'}
3382 0 0 50 $args{'class'} ne "satcat" or exists $args{'CURRENT'}
4017 0 1 0 $alias{$verb} || $verb
4048 0 0 0 $read ||= $interactive ? eval { do { $self->_get_readline($stdout) } } || sub { print {$stdout;} $self->getv('prompt'); return readline STDIN; } : sub { return readline STDIN; }
4101 1 0 1 $verb eq "exit" or $verb eq "bye"
4165 1 0 0 $self->content_type or not $self->{'filter'}
4186 0 1 0 $rdln ||= "Term::ReadLine"->new("SpaceTrack orbital element access")
4193 0 0 0 $readline_word_break_re ||= qr/ [\Q$readline::rl_completer_word_break_characters\E]+ /msx
4800 6 77 0 $format_map{$format} || $format
4904 1 32 0 $context->{'json'} ||= $self->_get_json_object("pretty", $context->{'opt'}{'pretty'})
4930 32 0 0 $context->{'json'} ||= $self->_get_json_object("pretty", $context->{'opt'}{'pretty'})
5880 2 0 0 $no_such_name{$source} || $source
6088 17 68 0 $opt->{'sort'} ||= _validate_sort($opt->{'sort'})
6202 3 1 0 $opt->{'start_epoch'} ||= $opt->{'end_epoch'} - 86400
6203 1 3 0 $opt->{'end_epoch'} ||= $opt->{'start_epoch'} + 86400
6420 0 0 0 -S _ or -p _
6459 0 0 0 ref $app || $app