Branch Coverage

blib/lib/Net/SharePoint/Basic.pm
Criterion Covered Total %
branch 52 118 44.0


line true false branch
191 2 2 if $ENV{'NET_SHAREPOINT_VERBOSE'} or $ENV{'NET_SHAREPOINT_DEBUG'}
205 1 9 if $ENV{'NET_SHAREPOINT_DEBUG'}
219 1 0 if $ENV{'NET_SHAREPOINT_DEBUG'}
233 0 1 unless shift()
250 1 1 unless open my $mail_fh, "<", $file
274 1 0 unless -d $dir
275 0 1 $binary ? :
0 1 unless open my $fh, $binary ? ">:raw" : ">:encoding(utf8)", $file
276 0 1 if $binary
296 0 5 unless open my $conf_fh, "<", $config_file
298 2 38 if /^\#/
299 2 36 unless /\S/
303 2 34 unless ($value)
310 0 6 if $extra_value =~ /^\#/
311 0 6 unless $extra_value =~ /\S/
338 4 4 if ($opts->{'config_file'}) { }
342 0 4 if -f $DEFAULT_SHAREPOINT_CONFIG_FILE
347 4 5 if $key eq "config_file"
348 0 5 unless defined $opts->{$key}
398 0 2 unless $opts
400 3 3 if (not $opts->{$id}) { }
0 3 elsif (not $opts->{$id} =~ /^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$/) { }
409 1 1 unless $opts->{'sharepoint_client_secret'} and $opts->{'sharepoint_client_secret'} =~ /^(\S){43}\=/
412 1 1 unless $opts->{'sharepoint_access_url'} and $opts->{'sharepoint_access_url'} =~ m[^https://]
414 1 1 unless $opts->{'sharepoint_host'}
417 1 1 unless $opts->{'sharepoint_site'} and $opts->{'sharepoint_site'} =~ m[^sites/.+]
420 0 0 unless $opts->{$extra_opt}
444 1 2 if @{$self->{'log'};} > $self->{'config'}{'max_log_size'}
491 0 0 unless ($token_response->is_success)
521 0 0 if (-f $token_file) { }
525 0 0 if time > $self->{'token'}{'ts'} - 1200 and not $self->update_token
529 0 0 unless $self->update_token
557 1 38 unless $opts and $opts->{'pattern'} || $opts->{'type'}
559 0 38 if $folder eq "/"
563 38 0 unless ($pattern)
564 1 37 unless ($PATTERNS{$opts->{'type'}})
568 21 16 if (ref $PATTERNS{$opts->{'type'}}) { }
569 1 20 unless ($opts->{'subtype'} and $PATTERNS{$opts->{'type'}}{$opts->{'subtype'}})
581 0 36 if $self->{'config'}{'base_subfolder'}
623 0 0 $opts->{'action'} eq 'download' || $opts->{'action'} eq 'list' ? :
626 0 0 unless ($self->init_token)
633 0 0 if ($response->is_success)
662 0 0 $chunk_n == 0 ? :
0 0 $chunk_n == $total_chunks ? :
691 0 0 ref $item ? :
698 0 0 ref $item ? :
703 0 0 $chunk_n ? :
720 0 0 unless $r
749 0 0 if (not $object and $opts->{'type'} ne "file")
754 0 0 if ($opts->{'type'} eq "file")
755 0 0 unless (-f $item)
766 0 0 ref $item ? :
0 0 if (length(ref $item ? $$item : $item) > $self->{'config'}{'chunk_size'}) { }
778 0 0 unless $r
818 0 0 if $target
832 0 0 unless defined $response
833 0 0 unless $opts->{'save_file'}
834 0 0 if -d $opts->{'save_file'}
872 0 0 unless defined $list_response