Branch Coverage

script/moku-pona
Criterion Covered Total %
branch 78 154 50.6


line true false branch
130 0 9 if $ENV{'MOKU_PONA'}
132 0 9 if $ENV{'XDG_DATA_HOME'} and -d $ENV{'XDG_DATA_HOME'} . '/moku-pona'
133 0 9 if $ENV{'HOME'} and -d $ENV{'HOME'} . '/.local/moku-pona'
134 0 9 if $ENV{'HOME'} and -d $ENV{'HOME'} . '/.moku-pona'
135 0 9 if $ENV{'APPDATA'} and -d $ENV{'APPDATA'} . '/.moku-pona'
136 0 9 if $ENV{'LOGDIR'} and -d $ENV{'LOGDIR'} . '/.moku-pona'
138 0 9 if $ENV{'XDG_DATA_HOME'}
139 0 9 if $ENV{'HOME'} and -d $ENV{'HOME'} . '/.local'
140 9 0 if $ENV{'HOME'}
141 0 0 if $ENV{'APPDATA'}
142 0 0 if $ENV{'LOGDIR'}
182 30 14 if /^=> /u
184 11 3 if ($host and $port)
205 0 0 unless $scheme and $scheme eq 'gemini'
206 0 0 unless $authority
214 0 0 unless ($stream)
222 0 0 unless $header
235 0 10 unless ($stream)
252 0 10 unless $scheme =~ /^gophers?$/u
253 10 0 if substr($path, 0, 1) eq '/'
254 10 0 $path ? :
255 10 0 $path ? :
269 0 0 if $query
271 0 0 $tls ? :
280 0 0 unless $header
301 8 21 unless -f $file
302 0 21 unless open my $fh, '<:encoding(UTF-8)', $file
311 3 14 unless -f $file
312 0 14 unless open my $fh, '<:encoding(UTF-8)', $file
321 1 21 unless -d $data_dir
322 0 22 unless open my $fh, '>:encoding(UTF-8)', $file
350 0 1 unless @$site
381 0 8 if (grep /^=> $uri_re /u, @$site) { }
0 8 elsif (grep /^=> \S+ $name_re/u, @$site) { }
414 2 2 if ($name eq $args[$j]) { }
423 2 2 unless $found
425 2 0 if ($count) { }
426 2 0 $count == 1 ? :
467 0 2 unless opendir my $dh, $data_dir
472 2 6 if $file eq $site_list
473 2 4 if $file eq $updated_list
474 2 2 if $caches{$file}
475 1 1 if ($confirm) { }
483 2 0 if (-f $updated_list)
484 0 2 unless open my $fh, '<:encoding(UTF-8)', $updated_list
493 2 2 if ($line =~ /^=> \S+ \d\d\d\d-\d\d-\d\d (.+)/u and not $sites{$1}) { }
500 1 1 if @deletes and not $confirm
503 1 1 if $confirm
505 1 1 if ($todo and not $confirm)
554 3 1 if (-f $updated_list)
555 0 3 unless open my $fh, '<:encoding(UTF-8)', $updated_list
581 0 10 unless @sites == 0 or grep {$_ eq $name;} @sites
582 10 0 unless $quiet
586 10 0 if ($uri =~ /^gopher/u) { }
0 0 elsif ($uri =~ /^gemini/u) { }
0 0 elsif ($uri =~ /^http/u) { }
597 5 0 unless 'Mojo::IOLoop'->is_running
603 0 10 unless ($new)
610 2 8 if ($new =~ /^<(\?xml|rss)/u)
616 4 6 if ($new ne $old) { }
617 4 0 unless $quiet
621 6 0 unless $quiet
670 0 5 if ($@)
685 1 6 unless $links
723 0 1 unless -d $target
724 0 1 unless -f $site_list
725 0 1 unless -f $updated_list
730 0 1 unless open my $in, '<:encoding(UTF-8)', $updated_list
732 0 1 unless open my $out, '>:encoding(UTF-8)', "$target/updates.txt"
741 1 0 if (-f "$data_dir/$uri")
755 0 0 if ($command eq 'add') { }
0 0 elsif ($command eq 'remove') { }
0 0 elsif ($command eq 'list') { }
0 0 elsif ($command eq 'cleanup') { }
0 0 elsif ($command eq 'update') { }
0 0 elsif ($command eq 'convert') { }
0 0 elsif ($command eq 'publish') { }