Branch Coverage

blib/lib/Net/PhotoBackup/Server.pm
Criterion Covered Total %
branch 0 62 0.0


line true false branch
89 0 0 $config->{'MediaRoot'} ? :
92 0 0 unless $media_root eq ''
95 0 0 unless (-d $config->{'MediaRoot'})
98 0 0 unless mkdir $config->{'MediaRoot'}
117 0 0 $port =~ / \A \d+ \z /msx ? :
0 0 $port eq '' ? :
146 0 0 if ($config) { }
149 0 0 unless $config->{$key}
153 0 0 unless open my $FH, '>', $self->{'config_file'}
161 0 0 unless close $FH
165 0 0 if (-f "$self->{'config_file'}")
167 0 0 unless open my $FH, '<', $self->{'config_file'}
171 0 0 if ($in_section) { }
0 0 elsif ($line =~ / \A \s* \[ photobackup \] \s* \z /msx) { }
172 0 0 if ($line =~ / \A \s* \[ /msx)
176 0 0 if ($line =~ / \A \s* MediaRoot \s* = \s* ([^\0]+) \s* \z /msx) { }
0 0 elsif ($line =~ / \A \s* Password \s* = \s* ([0-9A-F]{128}) \s* \z /imsx) { }
0 0 elsif ($line =~ / \A \s* Port \s* = \s* (\d+) \s* \z /msx) { }
197 0 0 unless $config->{$key}
213 0 0 unless $self->config
241 0 0 unless -f $self->{'pid'}
246 0 0 if $pid
269 0 0 if ($path_info eq '' or $path_info eq '/') { }
0 0 elsif ($path_info eq '/test') { }
270 0 0 if ($method eq 'GET') { }
0 0 elsif ($method eq 'POST') { }
276 0 0 if (not length $post_vars->{'password'} or $post_vars->{'password'} ne $config->{'Password'})
280 0 0 unless ($upload and -f $upload->path)
284 0 0 unless ($filesize)
296 0 0 if (not length $post_vars->{'password'} or $post_vars->{'password'} ne $config->{'Password'})
299 0 0 unless (-d $config->{'MediaRoot'})