| blib/lib/Novel/Robot/Browser.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 12 | 75 | 16.0 |
| 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'} |
| 89 | 0 | 0 | 0 | $o{'stop_sub'} and $o{'stop_sub'}->($info, $data_list, $i, %o) |
| 101 | 0 | 0 | 0 | $data_list->$#* >= 0 && exists $data_list->[-1]{'id'} |
| 152 | 6 | 0 | 0 | $min and $id < $min |
| 153 | 6 | 0 | 0 | $max and $id > $max |
| 221 | 0 | 0 | 2 | $res->{'headers'}{'content-encoding'} and $res->{'headers'}{'content-encoding'} eq "gzip" |
| 236 | 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 | 2 | 0 | $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'} |
| 101 | 0 | 0 | 0 | scalar @$data_list || $i |
| 111 | 0 | 0 | 0 | $r->{'id'} //= ++$item_id |
| 121 | 0 | 0 | 0 | $r->{$_} //= $temp_r->{$_} |
| 163 | 0 | 0 | 0 | $r->[-1]{'id'} // $item_num |
| 182 | 2 | 0 | 0 | $c || $DEFAULT_URL_CONTENT |
| 226 | 2 | 0 | 0 | $html || $content |
| 227 | 2 | 0 | 0 | $html || $content |
| 229 | 2 | 0 | 0 | $r || $DEFAULT_URL_CONTENT |