Condition Coverage

blib/lib/Novel/Robot/Parser.pm
Criterion Covered Total %
condition 18 122 14.7


and 3 conditions

line !l l&&!r l&&r condition
87 0 2 0 $s and $s =~ /^https?:/
93 0 2 0 $s and -f $s
294 0 0 0 $depth == $links[$i]{'depth'} and $parent eq $links[$i]{'parent'}
317 0 0 0 $opt{'chapter_url_regex'} and $x->{'url'} =~ /$opt{'chapter_url_regex'}/
318 0 0 0 $opt{'chapter_title_regex'} and $x->{'title'} =~ /$opt{'chapter_title_regex'}/
320 0 0 0 $x and $x->{'title'} =~ /$title_regex/
0 0 0 $y and $y->{'title'} =~ /$title_regex/
0 0 0 $z and $z->{'title'} =~ /$title_regex/
321 0 0 0 $x->{'url'} =~ /$chap_num_regex/ || $z->{'url'} =~ /$chap_num_regex/ and scalar @$arr > 50
331 0 0 0 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/
0 0 0 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'}
0 0 0 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'} and $y->{'url'} =~ /\.html$/
0 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 0 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/
0 0 0 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'}
0 0 0 defined $y->{'title'} and $y->{'title'} =~ /$title_regex/ and defined $y->{'url'} and $y->{'url'} =~ /$chap_num_regex/
0 0 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/
341 0 0 0 $res_arr and defined $res_arr->[0]{'url'}
0 0 0 $res_arr and defined $res_arr->[0]{'url'} and $res_arr->[0]{'url'} =~ /$chap_num_regex/
427 0 0 0 $cc_n > 5 and $no_next_r->{'word_num'} > 50
540 12 10 0 $chap->{'url'} and $rem{$chap->{'url'}} > 1
551 0 5 0 @res and $res[-1]{'content'} =~ /\x{6b63}\x{5728}\x{624b}\x{6253}\x{4e2d}/s

or 2 conditions

line l !l condition
162 0 0 $item_list || []
358 0 0 $res_arr || []
429 0 0 $grep_next_r[-1] || {}
530 0 0 $chap || ''
546 12 10 $chap->{'content'} //= ""
568 2 0 $o{'path'} ||= {}
596 0 2 $o->{'extract'} ||= "TEXT"
641 2 0 $flist || []
649 6 0 $f->{'content'} || ''
697 4 0 $c ||= ""

or 3 conditions

line l !l&&r !l&&!r condition
174 6 0 12 $r->{$_} ||= $NULL_INDEX{$_}
193 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#209">209</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/<title>[^<,]+?\x{4f5c}\x{8005}\x{ff1a}([^<,]+?)_/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#320">320</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> $x and $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="c0"> 0 </td> <td class="s"> $x and $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#321">321</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="c0"> 0 </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#377">377</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#427">427</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#485">485</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#544">544</a> </td> <td class="c3"> 6 </td> <td class="c3"> 16 </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#545">545</a> </td> <td class="c3"> 16 </td> <td class="c3"> 6 </td> <td class="c0"> 0 </td> <td class="s"> $chap->{'id'} //= $i </td> </tr> </table> </body> </html>