Branch Coverage: lib/OpenAPI/Handler/View.pm

# Branch Coverage

File: | lib/OpenAPI/Handler/View.pm
Coverage: | 78.4%

line | % | coverage | branch
--- | --- | --- | ---
9 | 100 | T | F | unless my $data = _HASH($$self{'_req_data'})
14 | 100 | T | F | if ($view eq '~')
18 | 50 | T | F | if ($name = delete $$data{'name'} and $name ne $view)
47 | 100 | T | F | if ($view eq '~')
50 | 100 | T | F | if (not $self->has_view($view))
63 | 50 | T | F | unless my $data = _HASH($$self{'_req_data'})
67 | 100 | T | F | unless $self->has_view($view)
73 | 100 | T | F | if (defined $new_name)
74 | 50 | T | F | unless _IDENT($new_name)
80 | 100 | T | F | if (defined $new_def)
81 | 50 | T | F | unless _STRING $new_def
87 | 100 | T | F | if (defined $new_desc)
88 | 50 | T | F | unless _STRING $new_desc
92 | 100 | T | F | if (%$data)
97 | 50 | T | F | $retval >= 0 ? :
107 | 100 | T | F | unless _IDENT($fix_var) or $fix_var eq '~'
116 | 100 | T | F | if ($fix_var ne '~' and $fix_var_value ne '~')
127 | 100 | T | F | if ($@)
132 | 100 | T | F | if (@unbound)
143 | 100 | T | F | unless $self->has_view($view)
156 | 50 | T | F | if ($nviews >= $VIEW_LIMIT)
161 | 50 | T | F | unless my $name = delete $$data{'name'}
163 | 50 | T | F | unless _IDENT($name)
166 | 100 | T | F | if (not defined $minisql)
169 | 100 | T | F | unless _STRING $minisql
172 | 100 | T | F | if (defined $desc)
173 | 50 | T | F | unless _STRING $desc
176 | 50 | T | F | if (%$data)
187 | 100 | T | F | if ($@)
196 | 100 | T | F | if (not $self->has_model($model))
206 | 50 | T | F | $self->do($insert) ? :
213 | 50 | T | F | unless _IDENT($view) or $view eq '~'
215 | 100 | T | F | if ($view eq '~')
218 | 50 | T | F | if (not $self->has_view($view))
222 | 50 | T | F | $self->do($sql) >= 0 ? :
228 | 50 | T | F | $self->do($sql) >= 0 ? :
234 | 100 | T | F | unless _IDENT($view)