Condition Coverage

blib/lib/Astro/App/Satpass2.pm
Criterion Covered Total %
condition 163 419 38.9


and 3 conditions

line !l l&&!r l&&r condition
657 1 0 269 $code = $self->can($verb) and $self->__get_attr($code, "Verb")
664 249 8 12 $unsatisfied and not $self->__get_attr($code, "Tweak", {})->{'unsatisfied'}
767 0 0 2 @{$self->{"frame"};} > 1 and "begin" eq $self->{"frame"}[-1]{"type"}
0 0 2 @{$self->{"frame"};} > 1 and "begin" eq $self->{"frame"}[-1]{"type"} and "if" eq $self->{"frame"}[-2]{"type"}
1193 0 0 0 openhandle $stdout and not -t $stdout
1483 0 0 2 @{$self->{"frame"};} > 1 and "begin" eq $self->{"frame"}[-1]{"type"}
0 0 2 @{$self->{"frame"};} > 1 and "begin" eq $self->{"frame"}[-1]{"type"} and "if" eq $self->{"frame"}[-2]{"type"}
1522 0 0 0 -e $init_file and not -d _
1656 7 0 0 @args and not $opt->{"choose"}
1713 2 0 0 &blessed($val) && $val->can('clone')
1952 16 1 3 $opt->{"almanac"} and not defined $opt->{"ephemeris"}
2192 0 2 134 defined $selector[$event] && $$opt{$selector[$event]}
2407 0 0 0 not $self->get("filter") and $self->_get_interactive
2441 0 0 0 $fn ne "-" and -e $fn
2523 0 0 0 $opt->{'changes'} and $sky_class{$body}
0 0 0 $opt->{'changes'} and $sky_class{$body} and $sky_class{$body} eq $self->{'sky_class'}{$body}
2562 2 25 0 defined $value and $value eq "undef"
2615 15 0 6 defined $value and "undef" ne $value
2655 0 0 14 defined $arg{'value'} and "" ne $arg{'value'}
2667 14 0 0 not $cls->can("init") and _is_case_tolerant()
2684 7 7 0 defined $arg{'class'} and not $obj->isa($arg{'class'})
2687 14 0 0 &blessed($old) and not $arg{'nocopy'}
14 0 0 &blessed($old) and not $arg{'nocopy'} and $old->can("copy")
2768 0 0 7 defined $val and "" ne $val
2878 0 7 0 defined $val and my $macro = $self->{'macro'}{$val}
2900 7 7 0 defined $val and $val eq "undef"
2944 0 0 0 defined $val and $val eq "undef"
2979 0 0 0 $depr = $self->_deprecation_in_progress("attribute", $name) and !$opt->{"deprecated"} || $depr >= 3
3151 0 0 0 $opt->{"add"} and $opt->{"delete"}
3186 0 0 0 $opt->{"add"} and push @{$$self{"sky"};}, $obj
3399 0 0 0 not $method =~ / \A _ /msx and $object->can($method)
3473 0 0 34 defined $self->{'height'} and defined $self->{'latitude'}
0 0 34 defined $self->{'height'} and defined $self->{'latitude'} and defined $self->{'longitude'}
3555 4 0 0 defined $stdout and -t $stdout
3589 4 0 0 @args and not $opt->{"choose"}
3715 42 2 0 1 == $state and @keys == $found
3739 0 1280 0 exists $accessor{$name} and !$level1_attr{$name} || $self->{'frame'}[-1]{'level1'}
3789 0 0 2 $rslt and my $code = $special{$attr}
3981 0 0 1 defined $layers and "" ne $layers
4046 0 14 0 not ref $file and "" eq $file
4243 5 22 26 @args && defined $args[0]
4250 0 1 1 exists $self->{$name} and not $force_set{$name}
4263 0 52 0 $frame->{'spacetrack'} and %{$frame->{'spacetrack'};}
4285 0 0 0 defined $val and "" ne $val
4354 0 41 0 $opt && $opt->{'dump'}
4477 0 0 0 not $cmd =~ s/ \A core [.] //msx and ref $app
0 0 0 not $cmd =~ s/ \A core [.] //msx and ref $app and $app->{'macro'}{$cmd}
4494 0 0 0 $rslt = $app->_readline_complete_options($code, $text, $line, $start) and @{$rslt;}
4551 0 0 0 1 == @rslt and $rslt[0] =~ / \W \z /msx
4779 0 0 9 not $method =~ / \A _ /msx and $object->can($method)
4785 4 0 5 @args and $parse_input{$name}
0 4 1 @args and $parse_input{$name} and $parse_input{$name}{$method}
4902 0 0 0 $version{$module} and $modver = $module->VERSION
5005 1 0 0 $sgn and "-" eq $sgn
5098 0 1 14 $in and defined(my $more = &$in(my $prompt = $self->get("continuation_prompt")))
5367 0 1 7 / ( \S+ ) /msx and !$self->{'macro'}{$1} || $1 eq $name
1 0 7 / ( \S+ ) /msx and !$self->{'macro'}{$1} || $1 eq $name and my $code = $filter{$1}
5429 0 0 0 $rslt[0] and $rslt[1]
5608 5646 0 35 $char eq "'" and not $relquote
4600 23 979 $char =~ / \s /msx and not $relquote
4623 42 937 $char =~ / \s /msx and not $relquote and not $opt->{'single'}
4593 0 72 $char eq "\$" and $inx < $len
5690 38 0 34 $name eq "{" and $inx < $len
5950 54 4 2 "" eq $rslt[-1]{'token'} and $next =~ / ['"] /msx
58 0 2 "" eq $rslt[-1]{'token'} and $next =~ / ['"] /msx and $quote = $next
5953 26 30 4 $quote and $next eq $quote
56 2 2 $quote and $next eq $quote and $rslt[-1]{'token'} ne ""
6006 5929 374 2 $inx >= $len and $absquote || $relquote
6028 6 370 32 @rslt and not defined $rslt[0]{'token'}
6029 6 370 0 defined $rslt[0]{'token'} and $rslt[0]{'token'} =~ s/ \A ( $command_equiv_re ) //msx
6049 6 118 252 defined $rslt[0]{'token'} and my $kode = $self->can($rslt[0]{'token'})
6057 5 960 0 $expand_tildes and $_->{'tilde'}
6080 341 0 31 $opt->{'single'} and $opt->{'noredirect'}
6098 0 0 74 defined $name and $name ne ""
6103 19 0 0 $indirect && ref $val

or 2 conditions

line l !l condition
32 0 20 eval { do { require Astro::Coord::ECI::TLE::Iridium; 'Astro::Coord::ECI::TLE::Iridium'->VERSION(0.077); 1 } } || 0
524 0 3 shift @args || "+1"
967 0 0 shift @args || "+7"
978 0 0 $self->{"formatter"}->tz || undef
1007 0 0 $opt->{"algorithm"} || "fixed"
1164 0 0 $eq->error || 'No valid result found'
1920 0 0 shift @args || "show"
1960 14 6 shift @args || "+7"
1967 0 20 shift @args || 60
2122 20 0 $opt ||= {}
2201 0 0 $self->{"_perl"} ||= []
2298 0 1 $args[1] || "+30"
2490 0 0 $self->$attribute($opt, "config") || "# none\n"
3065 12 0 shift @args || "list"
3422 0 0 $object->content_type || ""
3484 33 1 $self->{'location'} || ''
34 0 $self->{'refraction'} || 0
3496 3 0 shift @args || "show"
3622 0 1 shift @args || "+7"
3665 0 23 $self->{'frame'}[-1]{'post_dispatch'} ||= []
3972 0 0 $self->{'frame'}[-1]{'localout'} || \*STDOUT
4067 0 14 $opt->{'encoding'} || 'utf-8'
4189 59 0 $args ||= []
4190 22 37 $opt ||= {}
4191 52 7 $self->{'frame'} ||= []
4247 52 0 $frame->{'local'} || {}
4257 52 0 $frame->{$key} || {}
4353 41 0 $opt ||= {}
5427 0 0 $rslt[0]{$_} || 0
5587 379 2 shift @parms || []

or 3 conditions

line l !l&&r !l&&!r condition
789 2 0 2 !$cond || (@{$self->{'frame'};} > 2 ? $self->{'frame'}[-3]{'unsatisfied_if'} : 0)
863 0 1 0 $fh ||= $self->_file_opener($name, $mode)
1641 0 0 0 $^O eq 'MSWin32' || $^O eq 'VMS' || $^O eq 'MacOS'
1812 0 0 16 $name =~ / \W /msx or $name =~ / \A _ /msx
1882 0 0 0 $self->{"_macro_load"}{$name} ||= "Astro::App::Satpass2::Macro::Code"->new(%marg)
1924 0 0 0 $verb eq "show" or $verb eq "list"
1957 19 1 0 $opt->{"am"} or $opt->{"pm"}
2056 0 6 0 $almanac{$noon}{$illum} ||= do { my @day; my(@events) = grep({{"horizon", 1, "twilight", 1}->{$_->{"almanac"}{"event"}};} $illum->almanac_hash($self->_get_day_midnight($pass->{"time"}))); _almanac_localize(@events); foreach my $evt (@events) { $evt->{"event"} = "almanac"; my $pm = $evt->{"time"} >= $noon ? 1 : 0; push @{$day[$pm];}, $evt; } ; \@day }
2187 136 0 0 &isdual($event) or not $event =~ / \D /msx
2374 0 0 0 $go ||= "Getopt::Long::Parser"->new
2398 0 0 0 $in ||= $self->_get_readline
2487 0 0 0 ref $obj || $obj
2657 0 0 14 not defined $arg{'value'} or $arg{'value'} eq ""
2680 0 0 0 $arg{'message'} || "Can not instantiate object from '$arg{'value'}'"
2805 0 1 0 $go ||= "Getopt::Long::Parser"->new
2975 0 0 0 exists $mutator{$name} or $opt->{"readonly"}
2979 0 0 0 !$opt->{"deprecated"} || $depr >= 3
3224 8 0 0 $_->get("name") || $_->get("id")
3399 0 0 0 not $method =~ / \A _ /msx and $object->can($method) or $handler{$method}
3424 0 0 0 not $suppress_output{$content_type} or $verbose
3505 0 1 2 $verb eq "add" or $verb eq "drop"
1 0 0 $verb eq "show" or $verb eq "list"
3739 1280 0 0 !$level1_attr{$name} || $self->{'frame'}[-1]{'level1'}
4046 0 0 14 not defined $file or not ref $file and "" eq $file
4212 0 10 49 $prior->{'localout'} || $prior->{'stdout'}
3 10 46 $prior->{'unsatisfied_if'} || !$condition
4314 0 0 0 $dumper ||= do { foreach $_ ("YAML::Dump", "Data::Dumper::Dumper") { my($module, $routine) = / (.*) :: (.*) /msx; push @mod, $module; $dmpr{$module} = $routine; } ; my $mod = $self->_load_module(@mod); $mod->can($dmpr{$mod}) unless $kode{$mod} }
4336 0 0 0 $dumper ||= do { require Astro::App::Satpass2::Format::Dump; "Astro::App::Satpass2::Format::Dump"->new }
4431 0 0 0 $readline_word_break_re ||= qr/ [\Q$readline::rl_completer_word_break_characters\E]+ /msx
4478 0 0 0 $code ||= $app->can($cmd)
4509 0 0 0 -S _ or -p _
4529 0 0 0 ref $app || $app
4589 0 0 0 ref $app || $app
5010 7 23 0 $opt->{'accept'} or &looks_like_number($angle)
5117 0 0 0 $new_obj or $self->{'sky_class'}{CORE::fc $name}
5121 0 0 0 $new_obj || $self->_sky_object($name)
5222 8 3 0 $level1_requote{$command} || $level1_requote{''}
5367 6 1 1 !$self->{'macro'}{$1} || $1 eq $name
5608 3744 0 843 exists $rslt[-1]{'token'} or $relquote
5647 1 0 0 $escape{$next} || $next
5827 0 0 3 $special{$name} or not $name =~ / \D /msx
6006 0 2 374 $absquote || $relquote

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
2124 18 1 1 0 $opt->{'am'} xor $opt->{'pm'}
2127 0 6 0 6 $opt->{'am'} xor $_->[1]