Branch Coverage

blib/lib/Catalyst/Controller/SimpleCAS/Role/TextTranscode.pm
Criterion Covered Total %
branch 0 120 0.0


line true false branch
28 0 0 unless my $upload = $c->req->upload('Filedata')
33 0 0 if ($rct eq 'JSON' or $rct eq 'text/x-rapidapp-form-response')
40 0 0 unless my $out_codec = &Encode::find_encoding($dest_encoding)
51 0 0 unless $c->req->params->{'html_enc'}
73 0 0 unless ref $htmlref
76 0 0 unless my $comment = $1
77 0 0 unless my $filename = $2
92 0 0 if ($style)
106 0 0 if ($selector =~ /^\#cas\-selector\-wrap\-\w+$/) { }
112 0 0 unless $first =~ /^\#cas\-selector\-wrap\-/
143 0 0 unless $MIME->subparts
162 0 0 if (ref $src_octets)
182 0 0 if ($MIME and $MIME->subparts) { }
187 0 0 if (not $upload or $upload->type =~ /^text/) { }
189 0 0 unless my $in_codec = &Encode::find_encoding($src_encoding)
190 0 0 utf8::is_utf8($src_octets) ? :
194 0 0 unless my $checksum = $self->Store->add_content_file_mv($upload->tempname)
196 0 0 if $Content->imglink
207 0 0 if $filename
220 0 0 unless my($SubPart) = $MIME->subparts
223 0 0 if $SubPart->content_type and $SubPart->content_type =~ m[multipart/related]
229 0 0 unless my($MainPart) = $MIME->subparts
255 0 0 if $char_set
265 0 0 if $Part == $MIME or $Part == $MainPart
268 0 0 if ($content_id)
276 0 0 if ($content_location)
278 0 0 if ($base_path)
294 0 0 unless my $body = $self->parse_html_get_body($htmlref)
300 0 0 if ($style)
310 0 0 if $parts[0] =~ /^\#$auto_css_pre/
312 0 0 if lc $selector eq 'body'
323 0 0 if ($style)
350 0 0 if $in_body and $tag->is_end_tag('body')
351 0 0 if $in_body and not $tag->is_comment
352 0 0 if $tag->is_start_tag('body')
354 0 0 if $inner eq ''
367 0 0 if ($tag->is_end_tag('style'))
371 0 0 if $in_style
372 0 0 if ($tag->is_start_tag('style'))
376 0 0 if $strip and not $tag->is_tag('style')
378 0 0 if $styles eq ''
380 0 0 if $strip
397 0 0 if ($tag->is_tag('base'))
398 0 0 unless my $url = $tag->get_attr('href')
410 0 0 unless my $content_location = $Part->header('Content-Location')
425 0 0 unless ref $part_ndx eq 'HASH'
432 0 0 if $tag->is_tag('base')
434 0 0 unless my $url = $tag->get_attr($attr)
435 0 0 unless my $Part = $part_ndx->{$url}
436 0 0 unless my $cas_url = $self->mime_part_to_cas_url($c, $Part)
465 0 0 if ($tag->is_tag('img')) { }
0 0 elsif ($tag->is_tag('a')) { }
475 0 0 unless my $url = $tag->get_attr($attr)
478 0 0 if ($url =~ /^data:/)
480 0 0 if $newurl
498 0 0 unless lc $encoding eq 'base64'
501 0 0 unless my $checksum = &try(sub { $self->Store->add_content_base64($base64_data); } )
504 0 0 $c->can('mount_url') ? :
519 0 0 unless my $checksum = $self->Store->add_content($data)
522 0 0 $c->can('mount_url') ? :