Branch Coverage

blib/lib/Stancer/Core/Object.pm
Criterion Covered Total %
branch 93 96 96.8


line true false branch
54 569 243 if $key ne "id" and $key ne "created"
70 38 680 if ($this->populate->$has)
122 0 1555 unless defined $this->_modified
134 39 59 if defined $this->$attr
176 49 64 if $is_modified
179 2 60 if defined $this->$attr and $this->$attr->is_modified
205 12 86 if defined $this->$attr
219 121 23 if ($this->endpoint)
223 69 75 if ($this->id)
234 1 2 unless defined $this->id
238 1 1 if ($data)
256 7 15 unless defined $this->_api_data
257 6 9 unless defined $target
261 3 6 if ref $data ne ""
270 100 40 if (scalar @args == 1) { }
279 134 837 unless defined $data->{$key}
283 83 754 if (&JSON::is_bool($data->{$key}))
287 0 83 if "$tmp" eq "true"
288 0 83 if "$tmp" eq "false"
291 20 817 if ($this->can($key) and builtin::blessed($this->$key) and $this->$key->can('hydrate')) { }
396 421 elsif ($this->can($setter)) { }
351 70 elsif ($this->can($key)) { }
292 15 5 if (ref $data->{$key} eq 'HASH') { }
313 459 46 if not $this->id or $this->populated or not $this->endpoint
320 42 2 if ($data)
327 17 31 if (defined $this->{$attr} and defined $decoded->{$attr})
351 5 25 if $this->is_not_modified
357 5 20 if (defined $this->id) { }
367 24 1 if ($data)
397 18 93 if &any(sub {
398 64 29 if $attr =~ /^_/msu
400 3 26 if (builtin::blessed($this->$attr) and $this->$attr->isa(__PACKAGE__)) { }
406 8 21 if (&any(sub {
409 4 4 if "$tmp" eq 1
410 4 4 if "$tmp" eq 0
413 8 21 if (&any(sub {
427 28 233 if ($this->id)
430 8 20 if $this->is_not_modified
434 560 2109 if &any(sub {
435 1631 478 if $attr =~ /^_/msu
436 1 477 if $attr eq "id"
437 30 447 unless defined $this->$attr
441 15 432 if (&any(sub {
444 3 12 if "$tmp" eq 1
445 2 13 if "$tmp" eq 0
448 51 396 if (&any(sub {
452 15 432 if (defined builtin::blessed($this->$attr) and builtin::blessed($this->$attr) eq "DateTime")
453 9 6 if (&any(sub {