Branch Coverage

blib/lib/Astro/App/Satpass2/Utils.pm
Criterion Covered Total %
branch 78 128 60.9


line true false branch
96 332 18 if has_method($self, "__parse_time_reset")
100 1 1180 has_method($_, 'dereference') ? :
105 6 344 if ("HASH" eq ref $args[0])
114 4 34 if ('CODE' eq ref $lgl->[$inx]) { }
115 0 4 unless defined $name
117 2 2 if (exists $opt->{$name})
126 0 9 unless $opt_name{$key}
161 0 344 unless ($go->getoptionsfromarray(\@args, \%opt, "default=s", @$lgl))
175 0 350 unless "CODE" eq ref $code
179 24 326 if (@{$lgl;} and ":compute" eq $lgl->[0])
180 0 24 unless my $method = $lgl->[1]
191 348 2 unless my $dflt = delete $opt->{'default'}
193 0 2 if ('ARRAY' eq ref $dflt) { }
0 2 elsif (ref $dflt) { }
2 0 elsif (my $code = $self->can('__tokenize')) { }
205 6 8 unless defined $args->[$inx] and "" ne $args->[$inx]
215 0 0 if (@arg) { }
235 0 0 if wantarray
243 0 0 unless defined(my $back_end = $self->{'_back_end'}{'class'})
244 0 0 if $back_end eq $self->__back_end_default
247 0 0 unless @{$self->{'_back_end'}{'arg'};}
265 10 0 unless load_package("Date::Manip")
267 0 0 if "Date::Manip"->isa("Date::Manip::DM6")
294 0 10 unless $method_to_sub{$method}
296 5 5 if (&blessed($obj) and $obj->can($method)) { }
301 5 0 if (my $code = 'Carp'->can($method_to_sub{$method})) { }
313 29 8 @args > 1 ? :
314 37 0 if defined $fn
335 0 20 unless defined $user
338 16 4 if (my $code = $special{$user}) { }
339 7 9 unless defined(my $special_dir = &$code($user))
343 2 2 unless defined(my $home_dir = "File::HomeDir"->users_home($user))
354 0 0 unless defined $dir and not ref $dir and -d $dir and -x _
361 0 0 unless -r $path
379 1714 995 unless ref $object
380 25 970 unless &blessed($object)
386 26 1475 unless ref $object
387 494 981 unless &blessed($object)
393 0 127 if (defined $my_lib)
395 0 0 unless -d $my_lib
423 0 0 unless exists $version{$module}
434 50 98 if &blessed($prefix[0])
436 70 78 'HASH' eq ref $prefix[0] ? :
441 21 127 exists $opt->{'lib'} ? :
442 1 147 if (defined $use_lib)
448 0 212 if "" eq $_
450 212 0 if / \A [[:alpha:]]\w* (?: :: [[:alpha:]]\w* )* \z /msx
460 23 125 if exists $loaded{$key}
467 0 171 if "" eq $package
470 100 71 unless eval { do { require "$fn.pm"; 1 } }
476 0 71 if $version{$package}
481 1 53 if ($opt->{'fatal'})
497 0 0 if @args == 1
512 3 136 if defined $ENV{'ASTRO_APP_SATPASS2_CONFIG_DIR'}
529 0 0 unless my $rslt = "File::HomeDir"->my_dist_data("Astro-App-Satpass2")
538 0 43 unless (defined $cls and $cls =~ / \A [_[:alpha:]] \w* (?: :: \w+ )* \z /msx)
540 0 0 defined $cls ? :
541 0 0 $self->can('wail') ? :
545 0 4 unless / = /msx
554 25 25 wantarray ? :
559 0 100 unless defined $string
560 16 84 if &looks_like_number($string)
561 0 84 unless $string
562 68 16 unless $string =~ / [\s'"\$] /msx