Branch Coverage

blib/lib/Dancer/Plugin/Dropbox.pm
Criterion Covered Total %
branch 49 66 74.2


line true false branch
164 0 3 unless (defined $filepath)
168 0 3 unless $file
169 1 2 unless -d $file
180 0 12 if (@args == 1 and ref $args[0] eq 'HASH') { }
199 2 10 unless ($file)
206 3 7 unless (-e $file)
211 2 5 if (-f $file)
216 5 0 if (-d $file)
224 0 5 if ($template) { }
257 0 2 unless ($target and -d $target)
261 0 2 unless $uploaded
267 0 2 unless (_check_root($basename))
304 0 2 unless $target and -d $target
307 0 2 if -e $dirname
308 1 1 unless _check_root($dirname)
340 1 7 unless $target and -e $target
341 1 6 unless _check_root($filename)
344 3 3 if (-f $file_to_delete) { }
2 1 elsif (-d $file_to_delete) { }
362 0 27 unless -d $basedir
364 2 25 unless ($user and _check_root($user))
369 2 23 unless (-d $user_root)
370 0 2 if (plugin_setting()->{'autocreate_root'}) { }
373 0 0 unless mkdir $user_root, 448
385 9 16 if (ref $filepath eq 'ARRAY') { }
16 0 elsif (ref $filepath eq '') { }
408 2 116 if $dir =~ m[[\\/\0]]
410 1 115 if ($dir eq '.') { }
17 98 elsif ($dir eq '..') { }
98 0 elsif (splitdir($dir) == 1) { }
416 1 16 if (@realdir)
441 34 4 if ($root and $root eq $username) { }
457 0 11 if ($$f{'error'})