Condition Coverage

blib/lib/App/RSS2Leafnode.pm
Criterion Covered Total %
condition 0 544 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
1019 0 0 0 defined $str and not is_ascii($str)
1053 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'})
1075 0 0 0 $$headers{'Top'} and not defined $$headers{'X-Mailer:'}
1421 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
1444 0 0 0 $resp and $resp->is_success
1564 0 0 0 $$self{'render'} and $content_type eq 'text/html'
1656 0 0 0 defined $width and defined $this_width
0 0 0 defined $width and defined $this_width and $width < $this_width
1698 0 0 0 &Scalar::Util::looks_like_number($width) and $width > 0
1702 0 0 0 &Scalar::Util::looks_like_number($height) and $height > 0
1744 0 0 0 &Scalar::Util::looks_like_number($width) and $width > 0
1747 0 0 0 &Scalar::Util::looks_like_number($height) and $height > 0
1770 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'))
1824 0 0 0 $tagname eq 'link' and $$attr{'rel'} eq 'icon'
1832 0 0 0 $href && 'URI'->new_abs($href, $resp->base)
1899 0 0 0 $width > 0 and $width > 2 * $height
1926 0 0 0 $width <= 48 and $height <= 48
0 0 0 $width <= 48 and $height <= 48 and $type eq 'png'
1937 0 0 0 $width <= 96 and $height <= 96
2118 0 0 0 $tagname eq 'meta' and lc($$attr{'property'} || '') eq 'og:type'
2220 0 0 0 defined $$self{'html_extract_main'} && $$self{'html_extract_main'} eq 'attach_full' && $self->mime_part_from_response($resp, 'Disposition', 'attachment')
2282 0 0 0 $$l{'uri'} and $$l{'uri'}->canonical =~ m[^http://groups\.google\.com/group/([^/]+)/]
2425 0 0 0 $tag eq 'content' and atom_content_flavour($elt) ne 'link'
2562 0 0 0 $$l{'maybe_text'} and not $$l{'uri'} =~ m[^[a-z]+://]
2579 0 0 0 $tag eq 'enclosure' and defined(my $duration = non_empty($item->first_child_text('itunes:duration')))
2595 0 0 0 not $item->first_child('prism:url') and my $elt = $item->first_child('prism:doi')
2627 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')))
3221 0 0 0 is_empty($email) and $display =~ /^$mailbox_re$/o
3455 0 0 0 $err and $err =~ /not well-formed \(invalid token\) at (line \d+, column \d+, byte (\d+))/
3530 0 0 0 defined $$self{'uri'} and not $root->att_exists('xml:base')
3799 0 0 0 $uri && $uri->can('host') && $uri->host
4369 0 0 0 $body_is_html && !$$self{'render'}
4462 0 0 0 $links_want_html and $body_type eq 'html'
4552 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
4601 0 0 0 defined $url && $self->item_elt_comments_count($item, $url_elt)
4610 0 0 0 $elt && $elt->att('thr:count')
0 0 0 $elt && $elt->att('count')
0 0 0 $elt && $elt->att('atom:count')
4706 0 0 0 $jar and my $str = $jar->as_string ne ''

or 2 conditions

line l !l condition
720 0 0 $self->item_to_date($item) // (return -9007199254740992 * 2**971)
842 0 0 non_empty($uri->host) // 'localhost'
977 0 0 $resp->request->uri // ''
987 0 0 resp_exiftool_info($resp) // (return)
994 0 0 resp_exiftool_info($resp)->{'Title'} // (return)
1039 0 0 $$headers{'Top'} //= 0
1040 0 0 $$headers{'Encoding'} //= '-SUGGEST'
1053 0 0 $$headers{'Charset'} || 0
1318 0 0 $timingfields // (return undef)
1374 0 0 $$self{'global_status'} // (return)
1652 0 0 $link_elt->att('rel') || $link_elt->att('atom:rel') || ''
1654 0 0 ($link_elt->att('href') // $link_elt->att('atom:href')) // (next)
1660 0 0 $this_width || 0
1661 0 0 $link_elt->att('media:height') || 0
1774 0 0 $elt->att('width') || $elt->att('atom:width') || 0
0 0 $elt->att('height') || $elt->att('atom:height') || 0
1805 0 0 http_resp_favicon_uri($resp) || (return)
1882 0 0 $self->imagemagick_to_png($type, $data) // (return)
1917 0 0 $self->imagemagick_from_data($type, $data) // (return)
2086 0 0 resp_exiftool_info($resp)->{'Author'} // (return)
2118 0 0 $$attr{'property'} || ''
2266 0 0 $item->first_child_text('link') // (return undef)
2344 0 0 ($elt->att('atom:type') // $elt->att('type')) // (return 0)
2560 0 0 non_empty($elt->trimmed_text) // (next)
2659 0 0 $$l{'priority'} || 0
0 0 $$prev_l{'priority'} || 0
2740 0 0 elt_to_rendered_line($elt) // (next)
3147 0 0 elt_to_rendered_line($elt->first_child(qr/^(itunes:)?name$/)) // ''
3219 0 0 $maybe // ''
3459 0 0 $twig->encoding // 'utf-8'
3563 0 0 $elt->att('isPermaLink') // 'true'
3618 0 0 (($elt->att('thr:ref') // $elt->att('ref')) // $elt->att('atom:ref')) // (next)
3727 0 0 $item->first_child_trimmed_text('cap:severity') // ''
3729 0 0 $item->first_child_trimmed_text('wiki:importance') // ''
3768 0 0 $item->first_child_trimmed_text('cap:severity') // ''
3799 0 0 non_empty($uri && $uri->can('host') && $uri->host) // 'localhost'
3867 0 0 (non_empty($item->first_child_trimmed_text(qr/^((dc:)?language|twitter:lang)$/)) // non_empty($item->att('xml:lang'))) // (next)
3917 0 0 ($link->att('atom:rel') // $link->att('rel')) // ''
3977 0 0 $channel->first_child('feedburner:info') || (return)
3978 0 0 $elt->att('uri') // (return)
4172 0 0 $elt->att('url') // (next)
4364 0 0 $body_charset // 'undef'
4375 0 0 $$b{'priority'} || 0
0 0 $$a{'priority'} || 0
0 0 $$b{'download'} || 0
0 0 $$a{'download'} || 0
4579 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'))
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'))) // non_empty($elt->first_child_trimmed_text('prism:publicationDate'))
727 0 0 0 Date::Parse::str2time($str) // do { say __x('Unrecognised date "{date}" from {url}', 'date', $str, 'url', $$self{'uri'}); -9007199254740992 * 2**971 }
770 0 0 0 is_empty($host) or $host eq 'localhost'
786 0 0 0 is_empty($host) or $host eq 'localhost'
848 0 0 0 not $$self{'nntp'} or $$self{'nntp'}->host ne $$self{'nntp_host'}
961 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
1044 0 0 0 $$headers{'Date'} //= $now822
1211 0 0 0 $elt->att('atom:type') // $elt->att('type')
1225 0 0 0 $tag eq 'description' or $tag eq 'content:encoded'
1450 0 0 0 defined $$status{'ETag'} or defined $$status{'Last-Modified'}
1490 0 0 0 $$self{'global_status'}{$url} // do { $self->verbose(2, __x("no status info for {url}\n", 'url', $url)); return 1 }
1512 0 0 0 eval 'use Time::Duration::Locale; 1' or eval 'use Time::Duration; 1'
1545 0 0 0 defined $x && defined $y && $x eq $y || !(defined $x || defined $y)
1654 0 0 0 $link_elt->att('href') // $link_elt->att('atom:href')
1738 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') }
1770 0 0 0 $elt->att('src') // $elt->att('atom:src')
1866 0 0 0 $type eq 'image/vnd.microsoft.icon' or $type eq 'image/x-icon'
1879 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
1923 0 0 0 $width == 0 or $height == 0
1935 0 0 0 $width > 48 or $height > 48
2080 0 0 0 $self->http_resp_exiftool_author($resp) // 'nobody@' . $self->uri_to_host
2165 0 0 0 $resp->header('ETag') // do { require Digest::MD5; $resp->decode; my $content = $resp->content; Digest::MD5::md5_base64($content) }
2173 0 0 0 html_title($resp) // $resp->filename
0 0 0 (html_title($resp) // $resp->filename) // __x('RSS2Leafnode {url}', 'url', $url)
2344 0 0 0 $elt->att('atom:type') // $elt->att('type')
2431 0 0 0 $elt->att("atom:$name") // $elt->att($name)
2434 0 0 0 $elt->att('atom:rel') // $elt->att('rel')
2439 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'
2550 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 $$l{'uri'} //= ((((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'))
2560 0 0 0 $$l{'uri'} //= non_empty($elt->trimmed_text) // (next)
2568 0 0 0 $$l{'name'} //= __('Link')
2573 0 0 0 $elt->att('atom:length') // $elt->att('length')
2614 0 0 0 non_empty(elt_to_rendered_line($elt->first_child('title'))) // non_empty($elt->trimmed_text)
2627 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'))
2658 0 0 0 $$prev_l{'download'} ||= $$l{'download'}
3045 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') })
3065 0 0 0 $child->att('link') // $child->att('rss:link')
3070 0 0 0 $tag_to_link_name{$tag} // "\u${tag}:"
3196 0 0 0 /(.*)\((mailto:)?($mailbox_re)\)\s*$/o or /(.*)<(mailto:)?($mailbox_re)>\s*$/o
3542 0 0 0 $channel->first_child('channel') // $channel
3618 0 0 0 $elt->att('thr:ref') // $elt->att('ref')
0 0 0 ($elt->att('thr:ref') // $elt->att('ref')) // $elt->att('atom:ref')
3684 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
3742 0 0 0 $cap_severity_low{$cap_severity} or $wiki_importance eq 'minor'
3808 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')
3867 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)
3872 0 0 0 $lang // $$self{'resp'}->content_language
3917 0 0 0 $link->att('atom:rel') // $link->att('rel')
3918 0 0 0 $link->att('atom:href') // $link->att('href')
3986 0 0 0 $elt->att('atom:type') // $elt->att('type')
3987 0 0 0 $elt->att('atom:src') or $elt->att('src')
3991 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/]
4060 0 0 0 $field eq 'geocode' or $field eq 'parameter'
4326 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')
4368 0 0 0 $body_type eq 'html' || $body_type eq 'text/html'
4457 0 0 0 $headers{'Face:'} ||= $self->http_resp_to_face($resp)
4522 0 0 0 $attach_elt->att('atom:type') // $attach_elt->att('type')
4579 0 0 0 $elt->att('rel') // $elt->att('atom:rel')
4584 0 0 0 $elt->att('href') // $elt->att('atom:href')
4610 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'))