Branch Coverage

blib/lib/File/TVShow/Organize.pm
Criterion Covered Total %
branch 89 106 83.9


line true false branch
38 4 3 if (not defined $self->{'exceptionListSource'}) { }
58 1 1 if defined $countries
65 6 34 if (defined $path)
66 4 2 if (-e $path and -d $path) { }
69 4 0 unless ($self->{'showFolder'} =~ m[.*/$])
82 8 38 if (defined $path)
83 6 2 if (-e $path and -d $path) { }
86 1 5 unless ($self->{'newShowFolder'} =~ m[.*/$])
101 0 4 unless defined $self->{'showFolder'}
107 0 4 unless opendir DIR, $directory
109 1196 1184 if $file =~ /^\./
116 40 1144 if ($file =~ /\s\(?$self->{'countries'}\)?$/i)
127 32 8 unless exists $self->{'shows'}{lc $showNameHolder}
130 80 1104 if ($file =~ /\s\(?\d{4}\)?$/i)
136 72 8 unless exists $self->{'shows'}{lc $showNameHolder}
163 5 2 unless defined $curr_dir
167 0 7 unless opendir DIR, $curr_dir
171 76 49 if $file =~ /^\./
176 10 39 if $file =~ /\.done$/
177 32 7 if (not $self->recursion) { }
178 2 30 if -d $self->new_show_folder . $file
180 2 5 if -d $curr_dir . $file
186 6 31 unless $showData->is_tv_show
188 1 30 if (exists $self->{'_exceptionList'}{$showData->{'organize_name'}}) { }
199 2 29 unless (defined $self->show_path($showData->{'organize_name'}))
207 27 2 if ($self->season_folder)
226 1 0 if (defined $self->{'UnhandledFileNames'} and keys %{$$self{'UnhandledFileNames'};})
242 31 5 if @_ == 1
244 1 4 if ($delete =~ /[[:alpha:]]/ or $delete != 0 and $delete != 1) { }
248 3 1 if ($delete == 1) { }
1 0 elsif ($delete == 0) { }
265 41 4 if @_ == 1
267 1 3 if ($recursion =~ /[[:alpha:]]/ or $recursion != 0 and $recursion != 1) { }
271 2 1 if ($recursion == 1) { }
1 0 elsif ($recursion == 0) { }
286 58 3 if @_ == 1
288 1 2 if ($verbose =~ /[[:alpha:]]/ or $verbose != 0 and $verbose != 1) { }
292 1 1 if ($verbose == 1) { }
1 0 elsif ($verbose == 0) { }
307 31 4 if @_ == 1
309 1 3 if ($seasonFolder =~ /[[:alpha:]]/ or $seasonFolder != 0 and $seasonFolder != 1) { }
313 1 2 if ($seasonFolder == 1) { }
2 0 elsif ($seasonFolder == 0) { }
330 3 24 if ($season == 0) { }
336 0 27 if ($self->verbose) { }
337 0 0 unless -e $path
340 15 12 unless -e $path
352 0 29 unless defined $destination
353 0 29 unless defined $source
354 0 29 unless defined $file
366 0 29 if $self->verbose
371 29 0 if ($? == 0) { }
373 15 14 if ($self->delete) { }