| blib/lib/Novel/Robot/Browser.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 13 | 75 | 17.3 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 70 | 0 | 0 | 0 | $o{'stop_sub'} and $o{'stop_sub'}->($info, $data_list, $i, %o) |
| 71 | 0 | 0 | 0 | $o{'min_page_num'} and $o{'min_page_num'} > 1 |
| 79 | 0 | 0 | 0 | $o{'min_page_num'} and $i < $o{'min_page_num'} |
| 80 | 0 | 0 | 0 | $o{'max_page_num'} and $i > $o{'max_page_num'} |
| 88 | 0 | 0 | 0 | $o{'stop_sub'} and $o{'stop_sub'}->($info, $data_list, $i, %o) |
| 100 | 0 | 0 | 0 | $#$data_list >= 0 && exists $$data_list[-1]{'id'} |
| 148 | 6 | 0 | 0 | $min and $id < $min |
| 149 | 6 | 0 | 0 | $max and $id > $max |
| 217 | 0 | 0 | 2 | $res->{'headers'}{'content-encoding'} and $res->{'headers'}{'content-encoding'} eq "gzip" |
| 232 | 0 | 0 | 0 | -f $cookie and $cookie =~ /\.sqlite$/ |
| 0 | 0 | 0 | -f $cookie and $cookie =~ /\.txt$/ |
| line | l | !l | condition |
|---|---|---|---|
| 37 | 0 | 2 | $opt{'retry'} ||= 5 |
| 38 | 1 | 1 | $opt{'max_process_num'} ||= 5 |
| 40 | 0 | 2 | $opt{'use_chrome'} ||= 0 |
| 47 | 0 | 2 | $headers ||= {} |
| 66 | 0 | 0 | $o{'info_sub'}->(\$html) || {} |
| 67 | 0 | 0 | $o{'item_list'} || $o{'item_list_sub'}->(\$html) || [] |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 39 | 0 | 2 | 0 | $opt{'browser'} ||= _init_browser($opt{'browser_headers'}) |
| 70 | 0 | 0 | 0 | $o{'stop_sub'} and $o{'stop_sub'}->($info, $data_list, $i, %o) or defined $o{'item_list'} |
| 100 | 0 | 0 | 0 | scalar @$data_list || $i |
| 110 | 0 | 0 | 0 | $r->{'id'} //= ++$item_id |
| 117 | 0 | 0 | 0 | $r->{$_} //= $temp_r->{$_} |
| 159 | 0 | 0 | 0 | $$r[-1]{'id'} // $item_num |
| 178 | 2 | 0 | 0 | $c || $DEFAULT_URL_CONTENT |
| 222 | 2 | 0 | 0 | $html || $content |
| 223 | 2 | 0 | 0 | $html || $content |
| 225 | 2 | 0 | 0 | $r || $DEFAULT_URL_CONTENT |