Branch Coverage

lib/UR/Context/Transaction.pm
Criterion Covered Total %
branch 52 72 72.2


line true false branch
51 0 351 if ($last_trans and $last_trans != $UR::Context::current)
64 0 351 unless ($self)
79 1802 4095 if $class eq 'UR::Change'
84 2282 1813 if $aspect eq 'load' or $aspect eq 'load_external'
88 16 1797 if (not ref $object or $class eq 'UR::Object::Index')
93 42 1755 if ($aspect eq 'delete')
97 0 1797 if ref $class
107 0 1797 unless (ref $change)
118 0 0 @changes > 1 ? :
126 0 349 if (@_) { }
154 1 55 unless (ref $self)
156 0 1 unless ($self)
161 1 55 if ($self->state ne 'open')
168 0 55 unless ($self eq $open_transaction_stack[-1])
182 0 0 if ($later_transaction->isa('UR::DeletedRef'))
190 0 55 if ($open_transaction_stack[-2] and $open_transaction_stack[-2] != $parent)
204 0 55 unless ($self == $transaction and $transaction_change->changed_aspect eq 'create')
208 55 225 if ($change == $changes_to_undo[0])
219 0 280 unless ($change->isa('UR::DeletedRef'))
230 0 55 unless ($self->isa('UR::DeletedRef'))
236 52 3 unless (@open_transaction_stack)
248 1 293 unless (ref $self)
250 0 1 unless ($self)
255 0 294 if ($self->state ne 'open')
259 0 294 unless ($open_transaction_stack[-1] == $self)
266 1 293 unless ($self->$validator)
271 293 0 if ($self->state eq 'committed') { }
278 270 23 unless (@open_transaction_stack)
301 1 292 if (@invalid)
314 0 282 if (@_)
321 21 261 if (&$is_failure($result, $eval_error)) { }
323 14 7 if $eval_error
324 1 20 unless ($tx->rollback)
328 1 260 unless ($tx->commit)
333 278 2 if (wantarray) { }
358 12 266 if ($eval_error)