Condition Coverage

blib/lib/Novel/Robot/Parser.pm
Criterion Covered Total %
condition 18 121 14.8


and 3 conditions

line !l l&&!r l&&r condition
87 0 2 0 $url and $url =~ /^https?:/
291 0 0 0 $depth == $links[$i]{'depth'} and $parent eq $links[$i]{'parent'}
314 0 0 0 $opt{'chapter_url_regex'} and $x->{'url'} =~ /$opt{'chapter_url_regex'}/
315 0 0 0 $opt{'chapter_title_regex'} and $x->{'title'} =~ /$opt{'chapter_title_regex'}/
317 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/
318 0 0 0 $x->{'url'} =~ /$chap_num_regex/ || $z->{'url'} =~ /$chap_num_regex/ and scalar @$arr > 50
328 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/
338 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/
424 0 0 0 $cc_n > 5 and $no_next_r->{'word_num'} > 50
526 12 10 0 $chap->{'url'} and $rem{$chap->{'url'}} > 1
537 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
93 2 0 $url // "default"
159 0 0 $item_list || []
355 0 0 $res_arr || []
426 0 0 $grep_next_r[-1] || {}
516 0 0 $chap || ''
532 12 10 $chap->{'content'} //= ""
554 2 0 $o{'path'} ||= {}
582 0 2 $o->{'extract'} ||= "TEXT"
627 2 0 $flist || []
635 6 0 $f->{'content'} || ''
683 4 0 $c ||= ""

or 3 conditions

line l !l&&r !l&&!r condition
171 6 0 12 $r->{$_} ||= $NULL_INDEX{$_}
190 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#206">206</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#317">317</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#318">318</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#374">374</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#424">424</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#467">467</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#530">530</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#531">531</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>