Branch Coverage

blib/lib/UR/Object/Command/Crud.pm
Criterion Covered Total %
branch 90 130 69.2


line true false branch
59 0 69 unless $name
62 16 53 unless exists $sub_command_configs->{$name}
64 0 53 if (ref $sub_command_configs->{$name} ne 'HASH')
74 1 15 unless $params{'target_class'}
77 0 15 unless $self
79 15 0 unless $self->namespace
83 0 15 if @errors
131 15 0 unless ($self->target_name)
135 15 0 if (not $self->target_name_pl)
144 1 14 if 'UR::Object::Type'->get($self->namespace)
165 0 15 if 'UR::Object::Type'->get($list_command_class_name)
168 9 6 if exists $config{'skip'}
178 1 5 if ($show)
179 1 0 if ref $show
184 1 4 if ($order_by)
185 1 0 if ref $order_by
189 1 3 if %config
210 0 15 if 'UR::Object::Type'->get($create_command_class_name)
213 11 4 if exists $config{'skip'}
216 1 3 if (exists $config{'exclude'})
220 0 4 if %config
227 1 23 if grep {$property_name eq $_;} @exclude
228 0 23 if $target_property->class_name eq 'UR::Object'
229 0 23 if $property_name =~ /^_/
230 0 23 if grep {$target_property->$_;} 'is_calculated', 'is_constant', 'is_transient'
231 0 0 if $target_property->is_id and $property_name eq 'id' || $property_name =~ /_id$/
232 4 19 if grep {not $target_property->$_;} 'is_mutable'
233 0 4 if $target_property->is_many and $target_property->is_delegated and not $target_property->via
245 4 15 if ($property_name =~ s/_id(s)?$//)
246 0 4 if $1
248 4 0 if ($object_meta and not grep({$object_meta->$_;} 'is_calculated', 'is_constant', 'is_transient', 'id_class_by'))
251 4 0 if $object_meta->doc
258 0 4 unless %properties
278 0 15 if 'UR::Object::Type'->get($copy_command_class_name)
281 12 3 if exists $config{'skip'}
303 6 6 if exists $config{'skip'}
312 1 5 if (exists $config{'exclude'})
318 1 5 if (my $only_if_null = delete $config{'only_if_null'})
320 0 1 if ($only_if_null eq 1) { }
0 1 elsif (not $ref) { }
327 1 0 $ref eq 'ARRAY' ? :
331 0 6 if %config
338 5 1 if (not $update_meta) { }
354 0 36 if grep {$property_name eq $_;} @update_sub_command_names
355 2 34 if &List::MoreUtils::any(sub { $property_name eq $_; } , @exclude)
357 0 34 if $target_property->class_name eq 'UR::Object'
358 0 34 if $property_name =~ /^_/
359 0 34 if grep {$target_property->$_;} 'is_id', 'is_calculated', 'is_constant', 'is_transient'
360 6 28 if grep {not $target_property->$_;} 'is_mutable'
361 0 5 if $target_property->is_many and $target_property->is_delegated and not $target_property->via
370 6 22 if defined $target_property->valid_values
371 2 26 exists $only_if_null{$property_name} ? :
373 6 22 if ($property_name =~ s/_id(s)?$//)
374 0 6 if $1
376 6 0 if ($object_meta)
377 0 6 if grep {$object_meta->$_;} 'is_calculated', 'is_constant', 'is_transient', 'id_class_by'
384 0 28 if $properties_seen{$property_name}
388 5 23 if ($property{'is_many'}) { }
394 28 0 if $update_sub_command
410 0 23 if 'UR::Object::Type'->get($update_property_class_name)
433 2 21 $property->{'only_if_null'} ? :
480 5 5 $function eq 'add' ? :
491 0 12 if 'UR::Object::Type'->get($delete_command_class_name)
494 9 3 if exists $config{'skip'}
496 0 3 if %config