Branch Coverage

blib/lib/WWW/Firecrawl.pm
Criterion Covered Total %
branch 81 120 67.5


line true false branch
69 0 16 unless ref $page eq "HASH"
71 5 11 if defined $meta->{'error'} and length $meta->{'error'}
78 0 25 @args == 1 && ref $args[0] eq 'HASH' ? :
79 4 21 if (exists $args{'failure_codes'})
81 1 3 if exists $args{'is_failure'}
90 1 0 if (not ref $spec and defined $spec and $spec eq "any-non-2xx")
93 0 5 unless ref $p eq "HASH"
95 0 5 if defined $meta->{'error'} and length $meta->{'error'}
100 2 0 if (ref $spec eq "ARRAY")
104 0 5 unless ref $p eq "HASH"
106 1 4 if defined $meta->{'error'} and length $meta->{'error'}
138 18 13 if defined $self->api_key
144 18 0 defined $body ? :
165 0 15 if (defined $cw and $cw eq "Internal response")
177 8 7 if $response->is_success
179 5 2 $self->_retry_status_set->{$code} ? :
193 1 3 if (defined $ra and $ra =~ /\A\d+\z/)
198 0 3 if $idx > $backoff->$#*
209 8 7 unless $err
211 4 3 if ($retryable and $attempt < $max)
213 1 3 if (my $cb = $self->on_retry)
233 0 21 unless $self->is_response($response)
236 21 0 if (defined $body and length $body)
239 1 20 if ($@)
240 1 0 unless ($response->is_success)
256 1 19 unless ($response->is_success)
267 1 18 if (ref $data eq "HASH" and exists $data->{'success'} and not $data->{'success'})
291 0 7 unless ref $page eq "HASH"
297 0 9 unless ref $page eq "HASH"
301 5 1 if (defined $err and length $err and $bad_sc)
304 1 3 if defined $err and length $err
305 2 1 if $bad_sc
316 1 13 unless defined $args{'url'}
324 2 14 exists $opts{'strict'} ? :
325 3 13 if ($strict and $self->is_failure->($data))
341 0 11 if exists $args{'strict'}
354 1 1 unless defined $args{'url'}
372 1 1 unless defined $id and length $id
390 0 1 unless defined $id and length $id
405 0 1 unless defined $id and length $id
449 0 1 unless defined $next_url and length $next_url
466 0 1 unless defined $args{'url'}
473 1 0 if exists $data->{'links'}
490 1 1 unless defined $args{'query'}
513 2 1 unless ref $args{'urls'} eq "ARRAY"
528 0 1 unless defined $id and length $id
543 0 0 unless defined $id and length $id
558 0 1 unless defined $id and length $id
573 0 0 unless defined $next_url and length $next_url
592 1 1 unless ref $args{'urls'} eq "ARRAY"
607 0 1 unless defined $id and length $id
640 0 0 unless defined $id and length $id
655 0 0 unless defined $id and length $id
702 0 0 unless defined $id and length $id
749 0 0 unless defined $id and length $id
814 0 2 unless ref $urls eq "ARRAY"
820 1 5 if (my $e = $@)
821 1 0 ref $e && $e->isa('WWW::Firecrawl::Error') ? :
827 4 1 if ($self->is_scrape_ok($res)) { }
852 0 1 unless $result->{'failed'}