Condition Coverage

blib/lib/Novel/Robot/Parser.pm
Criterion Covered Total %
condition 43 118 36.4


and 3 conditions

line !l l&&!r l&&r condition
89 0 4 0 $url and $url =~ /^https?:/
292 6 9 8 $depth == $links[$i]{'depth'} and $parent eq $links[$i]{'parent'}
315 3 0 0 $opt{'chapter_url_regex'} and $x->{'url'} =~ /$opt{'chapter_url_regex'}/
316 3 0 0 $opt{'chapter_title_regex'} and $x->{'title'} =~ /$opt{'chapter_title_regex'}/
318 0 2 0 $y and $y->{'title'} =~ /$title_regex/
0 2 0 $z and $z->{'title'} =~ /$title_regex/
319 2 1 0 $x->{'url'} =~ /$chap_num_regex/ || $z->{'url'} =~ /$chap_num_regex/ and scalar @$arr > 50
329 0 0 1 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/
0 0 1 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'}
0 1 0 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'} and $y->{'url'} =~ /\.html$/
1 0 0 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'} and $y->{'url'} =~ /\.html$/ and not $x->{'url'} =~ /\.html$/
0 0 1 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/
0 0 1 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'}
0 0 1 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'} and $y->{'url'} =~ /$chap_num_regex/
0 1 0 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'} and $y->{'url'} =~ /$chap_num_regex/ and not $x->{'url'} =~ /$chap_num_regex/
339 0 0 1 $res_arr and defined $$res_arr[0]{'url'}
0 0 1 $res_arr and defined $$res_arr[0]{'url'} and $$res_arr[0]{'url'} =~ /$chap_num_regex/
416 0 0 0 $cc_n > 5 and $no_next_r->{'word_num'} > 50
518 12 13 0 $chap->{'url'} and $rem{$chap->{'url'}} > 1
529 0 6 0 @res and $res[-1]{'content'} =~ /\x{6b63}\x{5728}\x{624b}\x{6253}\x{4e2d}/s

or 2 conditions

line l !l condition
95 4 0 $url // "default"
161 1 0 $item_list || []
356 0 0 $res_arr || []
418 0 0 $grep_next_r[-1] || {}
508 0 0 $chap || ''
524 13 12 $chap->{'content'} //= ""
546 4 0 $o{'path'} ||= {}
574 0 4 $o->{'extract'} ||= "TEXT"
619 3 0 $flist || []
627 7 0 $f->{'content'} || ''
675 6 0 $c ||= ""

or 3 conditions

line l !l&&r !l&&!r condition
173 11 0 16 $r->{$_} ||= $NULL_INDEX{$_}
192 0 0 0 $r->{'book'} ||= $self->scrape_element_try($h, [{"path", "//meta[\@name=\"og:novel:book_name\"]", "extract", "\@content"}, {"path", "//meta[\@property=\"og:novel:book_name\"]", "extract", "\@content"}, {"path", "//meta[\@property=\"og:title\"]", "extract", "\@content"}, {"path", "//div[\@id=\"title\"]"}, {"path", "//div[\@class=\"title\"]"}, {"regex", qr/[^<]+?([^,<]+?)\x{5168}\x{6587}\x{9605}\x{8bfb},/is}, {"regex", qr/<title>[^<]+?\x{300a}([^,<]+?)\x{300b}/is}, {"regex", qr/<title>[^<]+?,([^,<]+?)\x{6700}\x{65b0}\x{7ae0}\x{8282}/is}, {"path", "//h1"}, {"path", "//h2"}], "sub", $self->can("tidy_writer_book")) </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#208">208</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> $r->{'writer'} ||= $self->scrape_element_try($h, [{"path", "//meta[\@name=\"author\"]", "extract", "\@content"}, {"path", "//meta[\@name=\"og:novel:author\"]", "extract", "\@content"}, {"path", "//meta[\@property=\"og:novel:author\"]", "extract", "\@content"}, {"path", "//*[\@class=\"author\"]"}, {"path", "//*[\@class=\"writer\"]"}, {"regex", qr"<span>\x{4f5c}\x{8005}\x{ff1a}</span>([^<]+)"is}, {"regex", qr"\x{4f5c}\x{8005}\x{ff1a}<span>([^<]+)</span>"is}, {"regex", qr"<(?:em|i|h3|h2|span)>\x{4f5c}\x{8005}\x{ff1a}([^<]+)</(?:em|i|h3|h2|span)>"is}, {"regex", qr"\x{4f5c}\x{8005}\x{ff1a}(?:<span>)?<a[^>]*>([^<]+)</a>"is}, {"regex", qr"<p>\x{4f5c}(?: |\s)*\x{8005}\x{ff1a}([^<]+)</p>"is}, {"regex", qr/\x{4f5c}\x{8005}\x{ff1a}([^<]+?) \x{53d1}\x{5e03}\x{65f6}\x{95f4}\x{ff1a}/s}, {"regex", qr/content="([^"]+?)\x{6700}\x{65b0}\x{8457}\x{4f5c}/s}, {"regex", qr/<title>[^<,]+?\x{6700}\x{65b0}\x{7ae0}\x{8282}\(([^<,]+?)\),/is}, {"regex", qr/content="[^"]+?,([^",]+?)\x{4f5c}\x{54c1}/s}], "sub", $self->can("tidy_writer_book")) </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#318">318</a> </td> <td class="c3"> 1 </td> <td class="c0"> 0 </td> <td class="c3"> 2 </td> <td class="s"> $x->{'title'} =~ /$title_regex/ or $y and $y->{'title'} =~ /$title_regex/ </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#"></a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="c3"> 2 </td> <td class="s"> $x->{'title'} =~ /$title_regex/ or $y and $y->{'title'} =~ /$title_regex/ or $z and $z->{'title'} =~ /$title_regex/ </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#319">319</a> </td> <td class="c3"> 1 </td> <td class="c0"> 0 </td> <td class="c3"> 2 </td> <td class="s"> $x->{'url'} =~ /$chap_num_regex/ || $z->{'url'} =~ /$chap_num_regex/ </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#375">375</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> $r->{$_} ||= $NULL_CHAPTER{$_} </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#416">416</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> $cc_n > 5 and $no_next_r->{'word_num'} > 50 or not @grep_next_r </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#459">459</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> $o{'writer'} || $topic->{'writer'} </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#"></a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> $o{'book'} || $topic->{'book'} || $topic->{'title'} </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#522">522</a> </td> <td class="c3"> 6 </td> <td class="c3"> 19 </td> <td class="c0"> 0 </td> <td class="s"> $chap->{'pid'} //= $i </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="blib-lib-Novel-Robot-Parser-pm.html#523">523</a> </td> <td class="c3"> 19 </td> <td class="c3"> 6 </td> <td class="c0"> 0 </td> <td class="s"> $chap->{'id'} //= $i </td> </tr> </table> </body> </html>