Branch Coverage

blib/lib/OpenAPI/Client.pm
Criterion Covered Total %
branch 48 60 80.0


line true false branch
27 1 6 unless my $code = $self->can($op)
33 1 1 unless my $code = $self->can("${op}_p")
39 0 24 @_ == 1 ? :
42 10 14 unless $class->isa($parent)
45 1 23 if $self->{'base_url'} and not &blessed($self->{'base_url'})
46 23 1 unless $self->{'ua'}
48 8 16 if (my $app = delete $self->{'app'})
63 5 5 if $attrs->{'app'}
66 0 10 if @{$schema->errors;}
68 0 10 unless eval "package $class;\nuse Mojo::Base '${parent}';\n1;\n"
75 2 8 unless $schema->can("routes")
78 0 13 unless $route->{'operation_id'}
89 1 16 ref $_[-1] eq 'CODE' ? :
93 9 8 if ($tx->error)
94 8 1 unless $cb
99 8 0 unless $cb
112 5 1 unless my $err = $tx->error
113 0 1 unless $err->{'code'}
114 0 1 if $tx->req->is_handshake and not $tx->is_websocket
134 4 4 if (exists $params->{$name}) { }
139 12 2 unless exists $content{$_}
172 10 13 if (@errors) { }
184 0 13 defined $content{'body'} ? :
196 17 1 if not $format or $format eq "multi"
197 0 1 if $format eq "pipes"
198 0 1 if $format eq "ssv"
199 0 1 if $format eq "tsv"
205 1 10 ref $params->{$name} eq 'ARRAY' ? :
17 11 !exists $params->{$name} ? :
213 0 24 if length $package > 110