line |
true |
false |
branch |
29
|
0 |
0 |
if defined $opt{'homepath'}
|
31
|
0 |
0 |
if (defined $self->{'profile'})
|
33
|
0 |
0 |
unless $config
|
45
|
0 |
0 |
if ($self->mgr->refresh_needed($self->profile))
|
47
|
0 |
0 |
unless $config
|
60
|
0 |
0 |
unless $#_
|
62
|
0 |
0 |
if $profile eq $self->{'profile'}
|
65
|
0 |
0 |
unless $config
|
79
|
0 |
0 |
unless $ok
|
82
|
0 |
0 |
if ($method eq 'get') { }
|
102
|
0 |
0 |
unless ref $response
|
105
|
0 |
0 |
unless ($response->is_success)
|
106
|
0 |
0 |
if ($response->header('content-type') eq 'application/json') { }
|
108
|
0 |
0 |
if $@
|
109
|
0 |
0 |
if grep {not exists $json->{$_};} "code", "message"
|
112
|
0 |
0 |
if $json->{'fieldError'} and ref $_->{'fieldError'} eq "ARRAY"
|
120
|
0 |
0 |
if $options->{'raw'}
|
122
|
0 |
0 |
unless $response->header("Content-Type") eq "application/json"
|
126
|
0 |
0 |
unless $json
|
129
|
0 |
0 |
if ($json->{'errorMessages'} and ref $json->{'errorMessages'} eq "ARRAY")
|
133
|
0 |
0 |
if $_->{'fieldError'} and ref $_->{'fieldError'} eq "ARRAY"
|
136
|
0 |
0 |
if length $error
|
157
|
0 |
0 |
if $token->{'dpp'}{'expires_on'} < time or $token->{'ngdp'}{'expires_on'} < time
|
177
|
0 |
0 |
unless $json
|
178
|
0 |
0 |
unless exists $json->{'dpp'} and exists $json->{'ngdp'}
|
190
|
0 |
0 |
if $self->{'session'}{'mailboxes'}
|
195
|
0 |
0 |
unless $json
|
198
|
0 |
0 |
unless $json
|
208
|
0 |
0 |
if $self->{'session'}{'folders'}
|
212
|
0 |
0 |
unless $_[0]
|
219
|
0 |
0 |
unless $json
|
224
|
0 |
0 |
unless keys %folders
|
236
|
0 |
0 |
unless $_[0]
|
267
|
0 |
0 |
unless $json
|
270
|
0 |
0 |
if @{$json->{'results'};} < $limit
|
307
|
0 |
0 |
unless @files
|
313
|
0 |
0 |
unless defined $resp
|
317
|
0 |
0 |
unless @files
|
329
|
0 |
0 |
utf8::is_utf8($text) || $text =~ /[\x80-\xff]/ ? :
|
340
|
0 |
0 |
if ($received =~ /^(\d{4})-(\d{2})-(\d{2})T(\d\d):(\d\d):(\d\d)/) { }
|
379
|
0 |
0 |
unless $fn =~ /[^\x00-\x80]/
|
414
|
0 |
0 |
if (exists $ENV{'HOME'}) { }
|
|
0 |
0 |
elsif ($^O =~ /win/i and exists $ENV{'USERPROFILE'}) { }
|
|
0 |
0 |
elsif ($^O =~ /win/i and exists $ENV{'WINDIR'}) { }
|
425
|
0 |
0 |
$#_ ? :
|
429
|
0 |
0 |
$#_ ? :
|
437
|
0 |
0 |
unless -d $home
|
440
|
0 |
0 |
unless $profile =~ m[\/([^\/]+)\.profile]
|
451
|
0 |
0 |
if (-f $file)
|
452
|
0 |
0 |
if $opt{'ok_if_exists'}
|
462
|
0 |
0 |
if flock $f, 6
|
464
|
0 |
0 |
if flock $f, 6
|
474
|
0 |
0 |
unless -f $file
|
476
|
0 |
0 |
unless open my $f, "<", $file
|
477
|
0 |
0 |
unless Net::MitDK::ProfileManager::lock($f)
|
484
|
0 |
0 |
unless $json
|
495
|
0 |
0 |
if $self->readonly
|
498
|
0 |
0 |
unless (-d $home)
|
499
|
0 |
0 |
unless mkdir $home
|
500
|
0 |
0 |
unless chmod 0750, $home
|
502
|
0 |
0 |
unless defined $name
|
503
|
0 |
0 |
unless chown $>, $gid, $home
|
509
|
0 |
0 |
if $@
|
513
|
0 |
0 |
if (-f $file) { }
|
514
|
0 |
0 |
unless open $f, "+<", $file
|
515
|
0 |
0 |
unless Net::MitDK::ProfileManager::lock($f)
|
517
|
0 |
0 |
unless truncate $f, 0
|
519
|
0 |
0 |
unless open $f, ">", $file
|
521
|
0 |
0 |
unless print $f $json
|
522
|
0 |
0 |
unless close $f
|
524
|
0 |
0 |
unless ($^O =~ /win32/i)
|
525
|
0 |
0 |
unless chmod 0640, $file
|
527
|
0 |
0 |
unless defined $name
|
528
|
0 |
0 |
unless chown $>, $gid, $file
|
539
|
0 |
0 |
unless unlink $self->homepath . "/$profile.profile"
|
546
|
0 |
0 |
unless exists $self->{'timestamps'}{$profile}
|
550
|
0 |
0 |
unless defined $mtime
|