Condition Coverage

blib/lib/App/RSS2Leafnode.pm
Criterion Covered Total %
condition 0 532 0.0


and 3 conditions

line !l l&&!r l&&r condition
247 0 0 0 length $str && substr($str, -1) ne "\n"
487 0 0 0 $$self{'html_charset_from_content'} and $resp->headers->content_is_html
1017 0 0 0 defined $str and not is_ascii($str)
1051 0 0 0 $$headers{'Type'} eq 'text/plain' and lc($$headers{'Charset'} || 0) eq 'utf-8'
0 0 0 $$headers{'Type'} eq 'text/plain' and lc($$headers{'Charset'} || 0) eq 'utf-8' and is_ascii($$headers{'Data'})
1073 0 0 0 $$headers{'Top'} and not defined $$headers{'X-Mailer:'}
1419 0 0 0 open $out, '>', $status_filename and print $out $str
0 0 0 open $out, '>', $status_filename and print $out $str and close $out
1442 0 0 0 $resp and $resp->is_success
1562 0 0 0 $$self{'render'} and $content_type eq 'text/html'
1654 0 0 0 defined $width and defined $this_width
0 0 0 defined $width and defined $this_width and $width < $this_width
1696 0 0 0 &Scalar::Util::looks_like_number($width) and $width > 0
1700 0 0 0 &Scalar::Util::looks_like_number($height) and $height > 0
1742 0 0 0 &Scalar::Util::looks_like_number($width) and $width > 0
1745 0 0 0 &Scalar::Util::looks_like_number($height) and $height > 0
1768 0 0 0 $elt = $where->first_child('author') and $elt = $elt->first_child('gd:image')
0 0 0 $elt = $where->first_child('author') and $elt = $elt->first_child('gd:image') and is_non_empty(my $url = $elt->att('src') // $elt->att('atom:src'))
1822 0 0 0 $tagname eq 'link' and $$attr{'rel'} eq 'icon'
1830 0 0 0 $href && 'URI'->new_abs($href, $resp->base)
1896 0 0 0 $width > 0 and $width > 2 * $height
1923 0 0 0 $width <= 48 and $height <= 48
0 0 0 $width <= 48 and $height <= 48 and $type eq 'png'
1934 0 0 0 $width <= 96 and $height <= 96
2115 0 0 0 $tagname eq 'meta' and lc($$attr{'property'} || '') eq 'og:type'
2217 0 0 0 defined $$self{'html_extract_main'} && $$self{'html_extract_main'} eq 'attach_full' && $self->mime_part_from_response($resp, 'Disposition', 'attachment')
2279 0 0 0 $$l{'uri'} and $$l{'uri'}->canonical =~ m[^http://groups\.google\.com/group/([^/]+)/]
2410 0 0 0 $tag eq 'content' and atom_content_flavour($elt) ne 'link'
2555 0 0 0 $tag eq 'enclosure' and defined(my $duration = non_empty($item->first_child_text('itunes:duration')))
2594 0 0 0 defined $subelt and defined(my $url = (non_empty($subelt->att('url')) // non_empty($subelt->att('href'))) // non_empty($subelt->att('atom:href')))
3160 0 0 0 is_empty($email) and $display =~ /^$mailbox_re$/o
3389 0 0 0 $err and $err =~ /not well-formed \(invalid token\) at (line \d+, column \d+, byte (\d+))/
3464 0 0 0 defined $$self{'uri'} and not $root->att_exists('xml:base')
3733 0 0 0 $uri && $uri->can('host') && $uri->host
4302 0 0 0 $body_is_html && !$$self{'render'}
4395 0 0 0 $links_want_html and $body_type eq 'html'
4485 0 0 0 defined $$status{'comments_count'} and defined $comments_count
0 0 0 defined $$status{'comments_count'} and defined $comments_count and $$status{'comments_count'} == $comments_count
4534 0 0 0 defined $url && $self->item_elt_comments_count($item, $url_elt)
4543 0 0 0 $elt && $elt->att('thr:count')
0 0 0 $elt && $elt->att('count')
0 0 0 $elt && $elt->att('atom:count')
4638 0 0 0 $jar and my $str = $jar->as_string ne ''

or 2 conditions

line l !l condition
718 0 0 $self->item_to_date($item) // (return -9007199254740992 * 2**971)
840 0 0 non_empty($uri->host) // 'localhost'
975 0 0 $resp->request->uri // ''
985 0 0 resp_exiftool_info($resp) // (return)
992 0 0 resp_exiftool_info($resp)->{'Title'} // (return)
1037 0 0 $$headers{'Top'} //= 0
1038 0 0 $$headers{'Encoding'} //= '-SUGGEST'
1051 0 0 $$headers{'Charset'} || 0
1316 0 0 $timingfields // (return undef)
1372 0 0 $$self{'global_status'} // (return)
1650 0 0 $link_elt->att('rel') || $link_elt->att('atom:rel') || ''
1652 0 0 ($link_elt->att('href') // $link_elt->att('atom:href')) // (next)
1658 0 0 $this_width || 0
1659 0 0 $link_elt->att('media:height') || 0
1772 0 0 $elt->att('width') || $elt->att('atom:width') || 0
0 0 $elt->att('height') || $elt->att('atom:height') || 0
1803 0 0 http_resp_favicon_uri($resp) || (return)
1879 0 0 $self->imagemagick_to_png($type, $data) // (return)
1914 0 0 $self->imagemagick_from_data($type, $data) // (return)
2083 0 0 resp_exiftool_info($resp)->{'Author'} // (return)
2115 0 0 $$attr{'property'} || ''
2263 0 0 $item->first_child_text('link') // (return undef)
2341 0 0 ($elt->att('atom:type') // $elt->att('type')) // (return 0)
2532 0 0 ((((((non_empty($elt->att('atom:href')) // non_empty($elt->att('href'))) // non_empty($elt->att('atom:src'))) // non_empty($elt->att('src'))) // non_empty($elt->att('url'))) // non_empty($elt->att('rdf:resource'))) // non_empty($elt->trimmed_text)) // (next)
2626 0 0 $$l{'priority'} || 0
0 0 $$prev_l{'priority'} || 0
2692 0 0 elt_to_rendered_line($elt) // (next)
3086 0 0 elt_to_rendered_line($elt->first_child(qr/^(itunes:)?name$/)) // ''
3158 0 0 $maybe // ''
3393 0 0 $twig->encoding // 'utf-8'
3497 0 0 $elt->att('isPermaLink') // 'true'
3552 0 0 (($elt->att('thr:ref') // $elt->att('ref')) // $elt->att('atom:ref')) // (next)
3661 0 0 $item->first_child_trimmed_text('cap:severity') // ''
3663 0 0 $item->first_child_trimmed_text('wiki:importance') // ''
3702 0 0 $item->first_child_trimmed_text('cap:severity') // ''
3733 0 0 non_empty($uri && $uri->can('host') && $uri->host) // 'localhost'
3801 0 0 (non_empty($item->first_child_trimmed_text(qr/^((dc:)?language|twitter:lang)$/)) // non_empty($item->att('xml:lang'))) // (next)
3851 0 0 ($link->att('atom:rel') // $link->att('rel')) // ''
3911 0 0 $channel->first_child('feedburner:info') || (return)
3912 0 0 $elt->att('uri') // (return)
4106 0 0 $elt->att('url') // (next)
4297 0 0 $body_charset // 'undef'
4308 0 0 $$b{'priority'} || 0
0 0 $$a{'priority'} || 0
0 0 $$b{'download'} || 0
0 0 $$a{'download'} || 0
4512 0 0 ($elt->att('rel') // $elt->att('atom:rel')) // (next)

or 3 conditions

line l !l&&r !l&&!r condition
212 0 0 0 !defined($str) || $str =~ /^\s*$/
273 0 0 0 'File::HomeDir'->my_home // croak('File::HomeDir says you have no home directory')
364 0 0 0 $$self{'config_filename'} // do { require File::Spec; 'File::Spec'->catfile($self->homedir, '.rss2leafnode.conf') }
371 0 0 0 $$self{'status_filename'} // do { require File::Spec; 'File::Spec'->catfile($self->homedir, '.rss2leafnode.status') }
421 0 0 0 $$self{'ua'} ||= do { require LWP::UserAgent; 'LWP::UserAgent'->VERSION(5.832); my $ua = 'LWP::UserAgent'->new('keep_alive', 1); &Scalar::Util::weaken($$ua{'App::RSS2Leafnode'} = $self); $ua->agent($self->user_agent); &Scalar::Util::weaken(my $weak_self = $self); $ua->add_handler('request_send', \&lwp_request_send__verbose); $ua->add_handler('response_done', sub { lwp_response_done__check_md5($weak_self, @_); } ); require HTTP::Message; my $decodable = HTTP::Message::decodable(); $self->verbose(2, 'HTTP decodable: ', $decodable); $ua->default_header('Accept-Encoding', $decodable); $ua }
460 0 0 0 $resp->header('Content-MD5') // do { $self->verbose(2, 'no Content-MD5 header'); return }
650 0 0 0 $isodate =~ /\dT\d/ or $isodate =~ /^\d{4}-\d{2}-\d{2}$/
676 0 0 0 non_empty($elt->first_child_trimmed_text('pubDate')) // non_empty($elt->first_child_trimmed_text('dc:date'))
0 0 0 (non_empty($elt->first_child_trimmed_text('pubDate')) // non_empty($elt->first_child_trimmed_text('dc:date'))) // non_empty($elt->first_child_trimmed_text('jf:creationDate'))
0 0 0 ((non_empty($elt->first_child_trimmed_text('pubDate')) // non_empty($elt->first_child_trimmed_text('dc:date'))) // non_empty($elt->first_child_trimmed_text('jf:creationDate'))) // non_empty($elt->first_child_trimmed_text('modified'))
0 0 0 (((non_empty($elt->first_child_trimmed_text('pubDate')) // non_empty($elt->first_child_trimmed_text('dc:date'))) // non_empty($elt->first_child_trimmed_text('jf:creationDate'))) // non_empty($elt->first_child_trimmed_text('modified'))) // non_empty($elt->first_child_trimmed_text('updated'))
0 0 0 ((((non_empty($elt->first_child_trimmed_text('pubDate')) // non_empty($elt->first_child_trimmed_text('dc:date'))) // non_empty($elt->first_child_trimmed_text('jf:creationDate'))) // non_empty($elt->first_child_trimmed_text('modified'))) // non_empty($elt->first_child_trimmed_text('updated'))) // non_empty($elt->first_child_trimmed_text('issued'))
0 0 0 (((((non_empty($elt->first_child_trimmed_text('pubDate')) // non_empty($elt->first_child_trimmed_text('dc:date'))) // non_empty($elt->first_child_trimmed_text('jf:creationDate'))) // non_empty($elt->first_child_trimmed_text('modified'))) // non_empty($elt->first_child_trimmed_text('updated'))) // non_empty($elt->first_child_trimmed_text('issued'))) // non_empty($elt->first_child_trimmed_text('dcterms:issued'))
0 0 0 ((((((non_empty($elt->first_child_trimmed_text('pubDate')) // non_empty($elt->first_child_trimmed_text('dc:date'))) // non_empty($elt->first_child_trimmed_text('jf:creationDate'))) // non_empty($elt->first_child_trimmed_text('modified'))) // non_empty($elt->first_child_trimmed_text('updated'))) // non_empty($elt->first_child_trimmed_text('issued'))) // non_empty($elt->first_child_trimmed_text('dcterms:issued'))) // non_empty($elt->first_child_trimmed_text('created'))
0 0 0 (((((((non_empty($elt->first_child_trimmed_text('pubDate')) // non_empty($elt->first_child_trimmed_text('dc:date'))) // non_empty($elt->first_child_trimmed_text('jf:creationDate'))) // non_empty($elt->first_child_trimmed_text('modified'))) // non_empty($elt->first_child_trimmed_text('updated'))) // non_empty($elt->first_child_trimmed_text('issued'))) // non_empty($elt->first_child_trimmed_text('dcterms:issued'))) // non_empty($elt->first_child_trimmed_text('created'))) // non_empty($elt->first_child_trimmed_text('lastBuildDate'))
0 0 0 ((((((((non_empty($elt->first_child_trimmed_text('pubDate')) // non_empty($elt->first_child_trimmed_text('dc:date'))) // non_empty($elt->first_child_trimmed_text('jf:creationDate'))) // non_empty($elt->first_child_trimmed_text('modified'))) // non_empty($elt->first_child_trimmed_text('updated'))) // non_empty($elt->first_child_trimmed_text('issued'))) // non_empty($elt->first_child_trimmed_text('dcterms:issued'))) // non_empty($elt->first_child_trimmed_text('created'))) // non_empty($elt->first_child_trimmed_text('lastBuildDate'))) // non_empty($elt->first_child_trimmed_text('published'))
725 0 0 0 Date::Parse::str2time($str) // do { say __x('Unrecognised date "{date}" from {url}', 'date', $str, 'url', $$self{'uri'}); -9007199254740992 * 2**971 }
768 0 0 0 is_empty($host) or $host eq 'localhost'
784 0 0 0 is_empty($host) or $host eq 'localhost'
846 0 0 0 not $$self{'nntp'} or $$self{'nntp'}->host ne $$self{'nntp_host'}
959 0 0 0 non_empty(html_title_exiftool_image($resp)) // non_empty(html_title_urititle($resp))
0 0 0 (non_empty(html_title_exiftool_image($resp)) // non_empty(html_title_urititle($resp))) // non_empty(html_title_exiftool($resp))
0 0 0 ((non_empty(html_title_exiftool_image($resp)) // non_empty(html_title_urititle($resp))) // non_empty(html_title_exiftool($resp))) // $resp->title
1042 0 0 0 $$headers{'Date'} //= $now822
1209 0 0 0 $elt->att('atom:type') // $elt->att('type')
1223 0 0 0 $tag eq 'description' or $tag eq 'content:encoded'
1448 0 0 0 defined $$status{'ETag'} or defined $$status{'Last-Modified'}
1488 0 0 0 $$self{'global_status'}{$url} // do { $self->verbose(2, __x("no status info for {url}\n", 'url', $url)); return 1 }
1510 0 0 0 eval 'use Time::Duration::Locale; 1' or eval 'use Time::Duration; 1'
1543 0 0 0 defined $x && defined $y && $x eq $y || !(defined $x || defined $y)
1652 0 0 0 $link_elt->att('href') // $link_elt->att('atom:href')
1736 0 0 0 ($elt = $where->first_child('icon')) && non_empty($elt->text) || ($elt = $where->first_child('logo')) && non_empty($elt->text) || ($elt = $where->first_child('itunes:image')) && non_empty($elt->att('href')) || ($elt = $where->first_child('media:thumbnail')) && is_non_empty($elt->att('url')) && do { $width = $elt->att('width'); $height = $elt->att('height'); $elt->att('url') } || ($elt = $where->first_child('media:thumbnail')) && is_non_empty($elt->att('atom:url')) && do { $width = $elt->att('width'); $height = $elt->att('height'); $elt->att('atom:url') }
1768 0 0 0 $elt->att('src') // $elt->att('atom:src')
1863 0 0 0 $type eq 'image/vnd.microsoft.icon' or $type eq 'image/x-icon'
1876 0 0 0 $type ne 'png' or $width == 0
0 0 0 $type ne 'png' or $width == 0 or $height == 0
0 0 0 $type ne 'png' or $width == 0 or $height == 0 or $width > 48
0 0 0 $type ne 'png' or $width == 0 or $height == 0 or $width > 48 or $height > 48
1920 0 0 0 $width == 0 or $height == 0
1932 0 0 0 $width > 48 or $height > 48
2077 0 0 0 $self->http_resp_exiftool_author($resp) // 'nobody@' . $self->uri_to_host
2162 0 0 0 $resp->header('ETag') // do { require Digest::MD5; $resp->decode; my $content = $resp->content; Digest::MD5::md5_base64($content) }
2170 0 0 0 html_title($resp) // $resp->filename
0 0 0 (html_title($resp) // $resp->filename) // __x('RSS2Leafnode {url}', 'url', $url)
2341 0 0 0 $elt->att('atom:type') // $elt->att('type')
2416 0 0 0 $elt->att("atom:$name") // $elt->att($name)
2419 0 0 0 $elt->att('atom:rel') // $elt->att('rel')
2424 0 0 0 $rel eq 'self' or $rel eq 'edit'
0 0 0 $rel eq 'self' or $rel eq 'edit' or $rel eq 'service.edit'
0 0 0 $rel eq 'self' or $rel eq 'edit' or $rel eq 'service.edit' or $rel eq 'license'
2532 0 0 0 non_empty($elt->att('atom:href')) // non_empty($elt->att('href'))
0 0 0 (non_empty($elt->att('atom:href')) // non_empty($elt->att('href'))) // non_empty($elt->att('atom:src'))
0 0 0 ((non_empty($elt->att('atom:href')) // non_empty($elt->att('href'))) // non_empty($elt->att('atom:src'))) // non_empty($elt->att('src'))
0 0 0 (((non_empty($elt->att('atom:href')) // non_empty($elt->att('href'))) // non_empty($elt->att('atom:src'))) // non_empty($elt->att('src'))) // non_empty($elt->att('url'))
0 0 0 ((((non_empty($elt->att('atom:href')) // non_empty($elt->att('href'))) // non_empty($elt->att('atom:src'))) // non_empty($elt->att('src'))) // non_empty($elt->att('url'))) // non_empty($elt->att('rdf:resource'))
0 0 0 (((((non_empty($elt->att('atom:href')) // non_empty($elt->att('href'))) // non_empty($elt->att('atom:src'))) // non_empty($elt->att('src'))) // non_empty($elt->att('url'))) // non_empty($elt->att('rdf:resource'))) // non_empty($elt->trimmed_text)
2544 0 0 0 $$l{'name'} //= __('Link')
2549 0 0 0 $elt->att('atom:length') // $elt->att('length')
2581 0 0 0 non_empty(elt_to_rendered_line($elt->first_child('title'))) // non_empty($elt->trimmed_text)
2594 0 0 0 non_empty($subelt->att('url')) // non_empty($subelt->att('href'))
0 0 0 (non_empty($subelt->att('url')) // non_empty($subelt->att('href'))) // non_empty($subelt->att('atom:href'))
2625 0 0 0 $$prev_l{'download'} ||= $$l{'download'}
2984 0 0 0 non_empty($elt->first_child_text('uri')) // non_empty($elt->att('url'))
0 0 0 (non_empty($elt->first_child_text('uri')) // non_empty($elt->att('url'))) // non_empty(do { my $child; $child->att('link') // $child->att('rss:link') if $child = $elt->first_child('rdf:Description') })
3004 0 0 0 $child->att('link') // $child->att('rss:link')
3009 0 0 0 $tag_to_link_name{$tag} // "\u${tag}:"
3135 0 0 0 /(.*)\((mailto:)?($mailbox_re)\)\s*$/o or /(.*)<(mailto:)?($mailbox_re)>\s*$/o
3476 0 0 0 $channel->first_child('channel') // $channel
3552 0 0 0 $elt->att('thr:ref') // $elt->att('ref')
0 0 0 ($elt->att('thr:ref') // $elt->att('ref')) // $elt->att('atom:ref')
3618 0 0 0 $_->att('text') // $_->att('itunes:text')
0 0 0 ($_->att('text') // $_->att('itunes:text')) // $_->att('atom:label')
0 0 0 (($_->att('text') // $_->att('itunes:text')) // $_->att('atom:label')) // $_->att('label')
0 0 0 ((($_->att('text') // $_->att('itunes:text')) // $_->att('atom:label')) // $_->att('label')) // $_->att('atom:term')
0 0 0 (((($_->att('text') // $_->att('itunes:text')) // $_->att('atom:label')) // $_->att('label')) // $_->att('atom:term')) // $_->att('term')
0 0 0 ((((($_->att('text') // $_->att('itunes:text')) // $_->att('atom:label')) // $_->att('label')) // $_->att('atom:term')) // $_->att('term')) // $_->text
3676 0 0 0 $cap_severity_low{$cap_severity} or $wiki_importance eq 'minor'
3742 0 0 0 elt_to_rendered_line($item->first_child('title')) // elt_to_rendered_line($item->first_child('dc:title'))
0 0 0 (elt_to_rendered_line($item->first_child('title')) // elt_to_rendered_line($item->first_child('dc:title'))) // elt_to_rendered_line($item->first_child('media:title'))
0 0 0 ((elt_to_rendered_line($item->first_child('title')) // elt_to_rendered_line($item->first_child('dc:title'))) // elt_to_rendered_line($item->first_child('media:title'))) // elt_to_rendered_line($item->first_child('dc:subject'))
0 0 0 (((elt_to_rendered_line($item->first_child('title')) // elt_to_rendered_line($item->first_child('dc:title'))) // elt_to_rendered_line($item->first_child('media:title'))) // elt_to_rendered_line($item->first_child('dc:subject'))) // __('no subject')
3801 0 0 0 non_empty($item->first_child_trimmed_text(qr/^((dc:)?language|twitter:lang)$/)) // non_empty($item->att('xml:lang'))
0 0 0 $lang //= (non_empty($item->first_child_trimmed_text(qr/^((dc:)?language|twitter:lang)$/)) // non_empty($item->att('xml:lang'))) // (next)
3806 0 0 0 $lang // $$self{'resp'}->content_language
3851 0 0 0 $link->att('atom:rel') // $link->att('rel')
3852 0 0 0 $link->att('atom:href') // $link->att('href')
3920 0 0 0 $elt->att('atom:type') // $elt->att('type')
3921 0 0 0 $elt->att('atom:src') or $elt->att('src')
3925 0 0 0 not defined $type or $type eq 'html'
0 0 0 not defined $type or $type eq 'html' or $type eq 'xhtml'
0 0 0 not defined $type or $type eq 'html' or $type eq 'xhtml' or $type eq 'application/xhtml+xml'
0 0 0 not defined $type or $type eq 'html' or $type eq 'xhtml' or $type eq 'application/xhtml+xml' or $type =~ m[^text/]
3994 0 0 0 $field eq 'geocode' or $field eq 'parameter'
4259 0 0 0 $item->first_child('content:encoded') || $item->first_child('description') || $item->first_child('dc:description') || $item->first_child('itunes:summary') || do { my $elt = $item->first_child('content'); my $flavour = atom_content_flavour($elt); $flavour eq 'link' ? undef : ($flavour eq 'attach' ? do { $attach_elt = $elt; undef } : $elt) } || $item->first_child('summary')
4301 0 0 0 $body_type eq 'html' || $body_type eq 'text/html'
4390 0 0 0 $headers{'Face:'} ||= $self->http_resp_to_face($resp)
4455 0 0 0 $attach_elt->att('atom:type') // $attach_elt->att('type')
4512 0 0 0 $elt->att('rel') // $elt->att('atom:rel')
4517 0 0 0 $elt->att('href') // $elt->att('atom:href')
4543 0 0 0 $elt && $elt->att('thr:count') // $elt && $elt->att('count')
0 0 0 ($elt && $elt->att('thr:count') // $elt && $elt->att('count')) // $elt && $elt->att('atom:count')
0 0 0 (($elt && $elt->att('thr:count') // $elt && $elt->att('count')) // $elt && $elt->att('atom:count')) // non_empty($item->first_child_trimmed_text('thr:total'))
0 0 0 ((($elt && $elt->att('thr:count') // $elt && $elt->att('count')) // $elt && $elt->att('atom:count')) // non_empty($item->first_child_trimmed_text('thr:total'))) // non_empty($item->first_child_trimmed_text('slash:comments'))