Branch Coverage

lib/ChordPro.pm
Criterion Covered Total %
branch 87 242 35.9


line true false branch
85 0 0 if $_ eq $lib
94 12 633 if ref $_ ne ""
99 0 91 if $main::options->{'debug'}
100 0 91 if $main::options->{'trace'}
101 0 91 if $main::options->{'debug'}
107 0 91 if $opts
108 0 91 if $main::options->{'debug'}
120 0 91 if $main::options->{'progress_callback'}
122 0 91 if ($main::options->{'convert-config'})
123 0 0 if @ARGV
128 91 0 if (defined $of and $of ne '') { }
0 0 elsif (-t STDOUT) { }
129 8 83 if ($of =~ /\.pdf$/iu) { }
0 83 elsif ($of =~ /\.ly$/iu) { }
0 83 elsif ($of =~ /\.(tex|ltx)$/iu) { }
6 77 elsif ($of =~ /\.cho$/iu) { }
0 77 elsif ($of =~ /\.msp$/iu) { }
9 68 elsif ($of =~ /\.(crd|txt)$/iu) { }
3 65 elsif ($of =~ /\.html?$/iu) { }
0 65 elsif ($of =~ /\.mma?$/iu) { }
0 65 elsif ($of =~ /\.(md|markdown)$/iu) { }
0 65 elsif ($of =~ /\.meta$/iu) { }
0 65 elsif ($of =~ /\.(debug)$/iu) { }
167 0 0 if (@ARGV > 1 or $main::options->{'dump-chords'} and not @ARGV)
173 0 0 if $main::options->{'verbose'}
183 0 91 if $@
185 0 91 if $main::options->{'verbose'} and $pkg->can("version")
197 19 72 if ($main::options->{'a2crd'})
207 0 72 if @ARGV > 1
214 0 72 if ($file =~ /(^|\s)--\w+/u or $file =~ /^["']/u)
221 0 0 unless &Getopt::Long::GetOptionsFromArray(\@w, \%opts, "config=s\@", \@cfg, "meta=s%", \%meta, "define=s%", \%defs, "title=s", "subtitle=s", "dir:s", "filelist:s") and @w == 1 && !keys(%opts) || @w == 0 && keys %opts
232 144 0 unless defined $opts{$_}
236 144 0 unless defined $opts{$_}
237 0 0 $opts{$_} eq '' ? :
239 0 72 unless (@w)
240 0 0 if @ARGV > 1 and not $file =~ /^--/u
245 0 72 if (defined $gopts{'dir'} and not fn_is_absolute($file))
251 0 72 if (@cfg)
257 0 72 if @ARGV > 1
261 0 72 if ($main::options->{'dump-chords'})
270 0 0 if $c =~ /^n\.?c\.?$/iu
271 0 0 if ($c =~ /^(.[b#]?)/u and $1 ne $prev)
273 0 0 if @chords
284 0 0 if @chords
291 0 0 if (@{$s->{'songs'};} == 1 and not exists $s->{'songs'}[0]{'body'}) { }
301 72 0 if ($of)
303 0 72 if ($f ne $of)
306 0 0 if $main::options->{'verbose'}
313 12 60 if $main::options->{'output'} eq "*"
318 71 8 if ($res and @$res > 0)
319 71 0 if ($of and $of ne '-') { }
321 3 68 unless $res->[-1] eq ""
327 0 0 unless $res->[-1] eq ""
776 91 0 if (defined $appname) { }
784 0 91 if ($app_lc eq "a2crd")
926 0 91 if ($reference)
957 0 91 if $clo->{'verbose'}
959 0 91 unless ($ok)
968 0 0 $manual == 2 ? :
974 0 91 if $ident or $clo->{'verbose'} or $help or $manual
975 0 91 if ($manual or $help)
976 0 0 if $help
977 0 0 if $manual
979 0 91 if $version
985 0 182 if (defined $_)
986 0 0 unless -r $_
990 182 0 if $clo->{'nodefaultconfigs'}
991 0 0 unless $configs{$config}
993 0 0 unless -r $_
998 0 91 if (defined $_)
1002 0 0 unless (fs_test("r", $try))
1005 0 0 unless $try and fs_test("r", $try)
1011 91 0 if $clo->{'nodefaultconfigs'}
1012 0 0 unless $configs{$config}
1014 0 0 unless fs_test("fr", $_->[0])
1019 273 0 unless $clo->{$config}
1031 0 91 if ($defcfg >= 2)
1039 0 91 if ($tmplcfg or $defcfg)
1047 0 91 if ($fincfg or $deltacfg)
1052 0 91 if ($about)
1057 0 91 if ($dump_chords)
1064 0 91 if ($clo->{'filelist'})
1072 0 0 unless /\S/u
1073 0 0 if /^#/u
1079 0 0 if (@files)
1080 0 0 if ($files[0] =~ /\.pdf$/iu)
1084 0 0 if ($files[-1] =~ /\.pdf$/iu)
1089 0 0 if @files
1097 0 91 unless $main::__EMBEDDED__ or $clo->{'dump-chords'} or $clo->{'convert-config'} or @ARGV
1107 0 0 $main::options->{'reference'} ? :
0 0 $VERSION =~ /_/u ? :
1112 0 0 if defined $exit
1118 0 0 if ($level > 2) { }
1126 0 0 $level > 1 ? :
1144 0 0 if defined $exit
1158 0 17 if ($_->{'aux'}) { }
1168 8 9 if ($level eq "short")
1180 9 0 unless defined $_
1192 9 0 unless defined $_
1204 0 0 unless defined $_
1210 0 9 unless defined $_
1216 99 0 if ($level eq 'normal') { }
1220 0 0 if (defined $_->{'dppath'}) { }
1227 0 99 if ($_->{'library'})
1228 0 0 if ($_->{'library'} =~ /i$/u) { }
1251 0 17 $main::options->{'reference'} ? :
1252 0 17 if $VERSION =~ /_/u
1255 8 9 if $level eq "short"
1264 0 9 if CP()->packager
1270 0 9 if (defined $ENV{'CHORDPRO_LIB'})
1278 0 9 if (defined $ENV{'FONTDIR'})
1290 0 9 unless eval { do { require ChordPro::Delegate::ABC; my $x = "ChordPro::Delegate::ABC"->info; $res->{'general'}{'abc'} = $x->{'info'} if $x->{'info'}; 1 } } or $@ =~ /Can't locate/u
1293 9 0 if $x->{'info'}
1305 99 0 $loc =~ m[^(.*)/\Q$pm\E$]u ? :
1311 0 9 if (defined $Wx::VERSION)
1365 0 9 if $i->{'relaxed'}
1388 0 0 unless $path
1389 0 0 if ($^O =~ /Win/u)
1402 0 0 if ($main::options->{'reference'})
1415 0 0 if defined $exit
1495 0 0 if defined $exit