Branch Coverage

blib/lib/LWP/Protocol/rsync.pm
Criterion Covered Total %
branch 28 102 27.4


line true false branch
59 2 0 unless defined $size and $size > 0
61 0 2 if (defined $proxy)
71 0 2 if ($scheme ne 'rsync')
83 4 4 if (defined $_)
90 0 2 if ($path =~ /[*?[]/)
95 0 2 defined $user ? :
104 0 2 if ($dir_listing)
110 1 1 if ($method eq 'HEAD')
127 0 1 _path_is_modules_or_root($path) ? :
1 0 if (my $resp = _run_rsync($password, ['rsync', '--no-dirs', _path_is_modules_or_root($path) ? '--quiet' : (), $uri_str], \$listing))
149 0 0 if ($dir_listing)
156 0 0 unless ($content_type)
166 0 1 if ($arg and not ref $arg) { }
175 0 1 unless binmode $temp_fh
181 1 0 if ($method eq 'GET')
187 0 1 if (not $dir_listing and defined(my $ims_str = $request->header('If-Modified-Since')))
189 0 0 if (defined(my $ims_time = &HTTP::Date::str2time($ims_str)))
194 0 0 if (defined $listing)
198 0 0 if (not defined $perms && $perms =~ /^d/ and defined $mtime and $mtime <= $ims_time)
212 1 0 unless ($dir_listing)
214 1 0 if (my $resp = _run_rsync($password, ['rsync', '--checksum', '-t', '--inplace', $uri_str, $filename], \$stdout))
233 0 0 if ($dir_listing) { }
234 0 0 unless ($uri_str =~ m[/\z])
235 0 0 if (my $resp = _run_rsync($password, ['rsync', $uri_str], $filename))
248 0 0 unless ($content_type)
260 0 0 if ($temp_fh)
266 0 0 unless (defined $bytes)
272 0 0 if (defined $readerr)
281 0 0 if ($method eq 'PUT')
287 0 0 if ($temp_fh)
288 0 0 if (defined(my $err = _http_message_content_to_fh($request, $temp_fh, $filename)))
296 0 0 if (my $resp = _run_rsync($password, ['rsync', '--checksum', '--inplace', $filename, $uri_str]))
321 0 2 unless ($stdout_ref)
340 2 0 unless (defined $password)
349 2 0 defined $stdout_ref ? :
356 1 1 unless ($eval)
369 1 0 if ($wstat != 0)
370 0 1 $stderr =~ /\@ERROR: auth failed/ ? :
1 0 ref $stdout_ref && defined $$stdout_ref ? :
390 1 0 if (eval { do { POSIX::WIFEXITED($wstat) } } and defined(my $exit_code = eval { do { POSIX::WEXITSTATUS($wstat) } }))
394 0 0 if (eval { do { POSIX::WIFSIGNALED($wstat) } } and defined(my $signal_number = eval { do { POSIX::WTERMSIG($wstat) } }))
412 0 0 unless (defined $content)
416 0 0 if (ref $content eq 'SCALAR') { }
0 0 elsif (ref $content eq 'CODE') { }
0 0 elsif (not ref $content) { }
418 0 0 if (print $fh $$content)
427 0 0 if (length $buf == 0)
430 0 0 unless print $fh $buf
436 0 0 if (print $fh $content)
487 3 0 if (($perms, $length, my $mtime_str) = $listing =~ m[\s*(\S+)\s+([0-9,.]+)\s+([0-9/]+ [0-9:]+)])
498 0 0 defined $mtime ? :