Condition Coverage

blib/lib/Astro/App/Satpass2.pm
Criterion Covered Total %
condition 168 423 39.7


and 3 conditions

line !l l&&!r l&&r condition
658 1 0 269 $code = $self->can($verb) and $self->__get_attr($code, "Verb")
665 249 8 12 $unsatisfied and not $self->__get_attr($code, "Tweak", {})->{'unsatisfied'}
768 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'}
1194 0 0 0 &openhandle($stdout) and not -t $stdout
1484 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'}
1523 0 0 0 -e $init_file and not -d _
1657 7 0 0 @args and not $opt->{'choose'}
1714 2 0 0 builtin::blessed($val) && $val->can('clone')
1953 16 1 3 $opt->{'almanac'} and not defined $opt->{'ephemeris'}
2193 0 2 134 defined $selector[$event] && $$opt{$selector[$event]}
2413 0 0 0 not $self->get("filter") and $self->_get_interactive
2447 0 0 0 $fn ne "-" and -e $fn
2529 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}
2568 2 25 0 defined $value and $value eq "undef"
2621 15 0 6 defined $value and "undef" ne $value
2661 0 0 14 defined $arg{'value'} and "" ne $arg{'value'}
2673 14 0 0 not $cls->can("init") and _is_case_tolerant()
2690 7 7 0 defined $arg{'class'} and not $obj->isa($arg{'class'})
2693 14 0 0 builtin::blessed($old) and not $arg{'nocopy'}
14 0 0 builtin::blessed($old) and not $arg{'nocopy'} and $old->can("copy")
2774 0 0 7 defined $val and "" ne $val
2884 0 7 0 defined $val and my $macro = $self->{'macro'}{$val}
2906 7 7 0 defined $val and $val eq "undef"
2950 0 0 0 defined $val and $val eq "undef"
2985 0 0 0 $depr = $self->_deprecation_in_progress("attribute", $name) and !$opt->{'deprecated'} || $depr >= 3
3169 0 0 0 $opt->{'add'} and $opt->{'delete'}
3204 0 0 0 $opt->{'add'} and push @{$$self{"sky"};}, $obj
3417 0 0 0 not $method =~ / \A _ /msx and $object->can($method)
3491 0 0 34 defined $self->{'height'} and defined $self->{'latitude'}
0 0 34 defined $self->{'height'} and defined $self->{'latitude'} and defined $self->{'longitude'}
3573 4 0 0 defined $stdout and -t $stdout
3607 4 0 0 @args and not $opt->{'choose'}
3733 42 2 0 1 == $state and @keys == $found
3757 0 1280 0 exists $accessor{$name} and !$level1_attr{$name} || $self->{'frame'}[-1]{'level1'}
3807 0 0 2 $rslt and my $code = $special{$attr}
3999 0 0 1 defined $layers and "" ne $layers
4065 0 17 0 not ref $file and "" eq $file
4272 5 22 26 @args && defined $args[0]
4279 0 1 1 exists $self->{$name} and not $force_set{$name}
4292 0 52 0 $frame->{'spacetrack'} and %{$frame->{'spacetrack'};}
4314 0 0 0 defined $val and "" ne $val
4383 0 41 0 $opt && $opt->{'dump'}
4506 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}
4523 0 0 0 $rslt = $app->_readline_complete_options($code, $text, $line, $start) and @{$rslt;}
4580 0 0 0 1 == @rslt and $rslt[0] =~ / \W \z /msx
4806 0 0 9 not $method =~ / \A _ /msx and $object->can($method)
4812 4 0 5 @args and $parse_input{$name}
0 4 1 @args and $parse_input{$name} and $parse_input{$name}{$method}
4929 0 0 0 $version{$module} and $modver = $module->VERSION
5032 1 0 0 $sgn and "-" eq $sgn
5125 0 1 14 $in and defined(my $more = &$in(my $prompt = $self->get("continuation_prompt")))
5394 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}
5456 0 0 0 $rslt[0] and $rslt[1]
5635 5647 0 35 $char eq "'" and not $relquote
4601 23 979 $char =~ / \s /msx and not $relquote
4624 42 937 $char =~ / \s /msx and not $relquote and not $opt->{'single'}
4594 0 72 $char eq "\$" and $inx < $len
5717 38 0 34 $name eq "{" and $inx < $len
5977 54 4 2 "" eq $rslt[-1]{'token'} and $next =~ / ['"] /msx
58 0 2 "" eq $rslt[-1]{'token'} and $next =~ / ['"] /msx and $quote = $next
5980 26 30 4 $quote and $next eq $quote
56 2 2 $quote and $next eq $quote and $rslt[-1]{'token'} ne ""
6033 5930 374 2 $inx >= $len and $absquote || $relquote
6055 6 370 32 @rslt and not defined $rslt[0]{'token'}
6056 6 370 0 defined $rslt[0]{'token'} and $rslt[0]{'token'} =~ s/ \A ( $command_equiv_re ) //msx
6076 6 118 252 defined $rslt[0]{'token'} and my $kode = $self->can($rslt[0]{'token'})
6084 5 960 0 $expand_tildes and $_->{'tilde'}
6107 341 0 31 $opt->{'single'} and $opt->{'noredirect'}
6125 0 0 74 defined $name and $name ne ""
6130 19 0 0 $indirect && ref $val

or 2 conditions

line l !l condition
33 0 20 eval { do { require Astro::Coord::ECI::TLE::Iridium; 'Astro::Coord::ECI::TLE::Iridium'->VERSION(0.077); 1 } } || 0
525 0 3 shift @args || '+1'
968 0 0 shift @args || '+7'
979 0 0 $self->{'formatter'}->tz || undef
1008 0 0 $opt->{'algorithm'} || 'fixed'
1165 0 0 $eq->get('error') || 'No valid result found'
1921 0 0 shift @args || 'show'
1961 14 6 shift @args || '+7'
1968 0 20 shift @args || 60
2123 20 0 $opt ||= {}
2202 0 0 $self->{'_perl'} ||= []
2304 0 1 $args[1] || '+30'
2496 0 0 $self->$attribute($opt, 'config') || "# none\n"
3083 12 0 shift @args || 'list'
3440 0 0 $object->content_type || ''
3502 33 1 $self->{'location'} || ''
34 0 $self->{'refraction'} || 0
3514 3 0 shift @args || 'show'
3640 0 1 shift @args || '+7'
3683 0 23 $self->{'frame'}[-1]{'post_dispatch'} ||= []
3990 0 0 $self->{'frame'}[-1]{'localout'} || \*STDOUT
4060 14 3 $opt ||= {}
4100 18 1 $opt ||= {}
4101 2 17 $opt->{'encoding'} || 'utf-8'
4218 59 0 $args ||= []
4219 22 37 $opt ||= {}
4220 52 7 $self->{'frame'} ||= []
4276 52 0 $frame->{'local'} || {}
4286 52 0 $frame->{$key} || {}
4382 41 0 $opt ||= {}
5454 0 0 $rslt[0]{$_} || 0
5614 379 2 shift @parms || []

or 3 conditions

line l !l&&r !l&&!r condition
790 2 0 2 !$cond || (@{$self->{'frame'};} > 2 ? $self->{'frame'}[-3]{'unsatisfied_if'} : 0)
864 0 1 0 $fh ||= $self->_file_opener($name, $mode)
1642 0 0 0 $^O eq 'MSWin32' || $^O eq 'VMS' || $^O eq 'MacOS'
1813 0 0 16 $name =~ / \W /msx or $name =~ / \A _ /msx
1883 0 0 0 $self->{'_macro_load'}{$name} ||= "Astro::App::Satpass2::Macro::Code"->new(%marg)
1925 0 0 0 $verb eq "show" or $verb eq "list"
1958 19 1 0 $opt->{'am'} or $opt->{'pm'}
2057 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 }
2188 136 0 0 &isdual($event) or not $event =~ / \D /msx
2380 0 0 0 $go ||= "Getopt::Long::Parser"->new
2404 0 0 0 $in ||= $self->_get_readline
2493 0 0 0 ref $obj || $obj
2663 0 0 14 not defined $arg{'value'} or $arg{'value'} eq ""
2686 0 0 0 $arg{'message'} || "Can not instantiate object from '$arg{'value'}'"
2811 0 1 0 $go ||= "Getopt::Long::Parser"->new
2981 0 0 0 exists $mutator{$name} or $opt->{'readonly'}
2985 0 0 0 !$opt->{'deprecated'} || $depr >= 3
3242 8 0 0 $_->get('name') || $_->get('id')
3417 0 0 0 not $method =~ / \A _ /msx and $object->can($method) or $handler{$method}
3442 0 0 0 not $suppress_output{$content_type} or $verbose
3523 0 1 2 $verb eq "add" or $verb eq "drop"
1 0 0 $verb eq "show" or $verb eq "list"
3757 1280 0 0 !$level1_attr{$name} || $self->{'frame'}[-1]{'level1'}
4065 0 0 17 not defined $file or not ref $file and "" eq $file
4241 0 10 49 $prior->{'localout'} || $prior->{'stdout'}
3 10 46 $prior->{'unsatisfied_if'} || !$condition
4343 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} }
4365 0 0 0 $dumper ||= do { require Astro::App::Satpass2::Format::Dump; "Astro::App::Satpass2::Format::Dump"->new }
4460 0 0 0 $readline_word_break_re ||= qr/ [\Q$readline::rl_completer_word_break_characters\E]+ /msx
4507 0 0 0 $code ||= $app->can($cmd)
4538 0 0 0 -S _ or -p _
4558 0 0 0 ref $app || $app
4618 0 0 0 ref $app || $app
5037 7 23 0 $opt->{'accept'} or &looks_like_number($angle)
5144 0 0 0 $new_obj or $self->{'sky_class'}{CORE::fc $name}
5148 0 0 0 $new_obj || $self->_sky_object($name)
5249 8 3 0 $level1_requote{$command} || $level1_requote{''}
5394 6 1 1 !$self->{'macro'}{$1} || $1 eq $name
5635 3745 0 843 exists $rslt[-1]{'token'} or $relquote
5674 1 0 0 $escape{$next} || $next
5854 0 0 3 $special{$name} or not $name =~ / \D /msx
6033 0 2 374 $absquote || $relquote

xor 4 conditions

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