Branch Coverage

blib/lib/PAGI/Request/Upload.pm
Criterion Covered Total %
branch 20 36 55.5


line true false branch
26 22 3 unless (defined $self->{'size'})
27 22 0 if (defined $self->{'data'}) { }
0 0 elsif (defined $self->{'temp_path'} and -f $self->{'temp_path'}) { }
50 0 3 unless $filename
77 3 2 if ($self->is_in_memory) { }
2 0 elsif ($self->is_on_disk) { }
81 0 2 unless open my $fh, "<:raw", $self->{'temp_path'}
92 1 0 if ($self->is_in_memory) { }
0 0 elsif ($self->is_on_disk) { }
94 0 1 unless open my $fh, "<", \$self->{'data'}
98 0 0 unless open my $fh, "<:raw", $self->{'temp_path'}
110 0 2 if ($dir and not -d $dir)
115 1 1 if ($self->is_in_memory) { }
1 0 elsif ($self->is_on_disk) { }
117 0 1 unless open my $fh, ">:raw", $destination
129 0 1 unless move($self->{'temp_path'}, $destination)
145 2 23 if $self->{'_cleaned_up'}
147 2 21 if ($self->is_on_disk and -f $self->{'temp_path'})