Branch Coverage

blib/lib/WE_Frontend/Publish/FTP_MD5Sync.pm
Criterion Covered Total %
branch 1 106 0.9


line true false branch
57 0 1 if ($] < 5.006)
62 0 0 if $@
84 0 0 ref $self->Config->project->stagingextracgi eq 'ARRAY' ? :
92 0 0 if ($self->Config->staging->stagingext->{'dryrun'})
96 0 0 if $deleteold and $movetotrash
98 0 0 if $movetotrash and not defined $trashdirectory
118 0 0 if (not defined $liveuser or $liveuser eq '')
128 0 0 if (not defined $livepassword or $livepassword eq '')
149 0 0 if (not defined $livehost or $livehost eq '')
159 0 0 if (not defined $pubhtmldir or $pubhtmldir eq '')
174 0 0 if (@extracgi and !defined($livecgidirectory) || $livecgidirectory eq '')
301 0 0 if (not defined $md5listcgi or $md5listcgi eq '')
304 0 0 unless (defined $topdirectory)
308 0 0 if ($v)
311 0 0 @extracgi ? :
314 0 0 $dryrun ? :
319 0 0 if ($deleteold) { }
0 0 elsif ($movetotrash) { }
332 0 0 unless ($res->is_success)
340 0 0 if ($line =~ /^\#\s*([^:]+):\s*(.*)/) { }
342 0 0 if ($key =~ /^digest$/i) { }
0 0 elsif ($key =~ /^directory$/i) { }
343 0 0 unless ($val =~ /md5/i)
352 0 0 unless (defined $curr_dir)
360 0 0 if ($v)
366 0 0 unless my $ftp = 'Net::FTP'->new($livehost, 'Debug', 0)
367 0 0 unless $ftp->login($liveuser, $livepassword)
369 0 0 if (defined $livedirectory and $livedirectory ne '')
370 0 0 unless $ftp->cwd($livedirectory)
371 0 0 if ($dryrun)
381 0 0 $topdirectory ne '' ? :
394 0 0 unless (exists $local_files{"$dir/$file"})
402 0 0 unless chdir $pubhtmldir
406 0 0 if ($v)
407 0 0 if (not $dryrun) { }
415 0 0 unless (-r $file)
419 0 0 if (exists $md5list{$remotedir}{$file})
421 0 0 unless open F, $file
425 0 0 if ($local_md5 eq $md5list{$remotedir}{$file}) { }
427 0 0 if ($v)
433 0 0 if ($copy)
434 0 0 if ($v)
435 0 0 if (not $dryrun) { }
436 0 0 unless $ftp->put($file, $file)
449 0 0 if ($deleteold) { }
0 0 elsif ($movetotrash) { }
0 0 elsif (@files_to_delete and $v) { }
451 0 0 if ($v)
452 0 0 if (not $dryrun) { }
453 0 0 unless $ftp->delete($file)
462 0 0 if ($v)
464 0 0 if (not $dryrun) { }
465 0 0 unless $ftp->rename($file, "$trashdirectory/$basefile")