Branch Coverage

blib/lib/Class/ReluctantORM.pm
Criterion Covered Total %
branch 4 368 1.0


line true false branch
350 0 0 unless (exists $GLOBAL_OPTIONS{$opt})
365 0 0 unless (exists $GLOBAL_OPTIONS{$opt})
374 0 0 if ($inv->can($subname)) { }
385 0 0 unless ($val =~ join('|', @policies))
534 0 0 if ($DEBUG > 1)
536 0 0 if (defined $CLASS_METADATA{$class})
541 0 0 defined $args{$flag} ? :
561 0 0 if ($args{'lazy_fields'}) { }
0 0 elsif ($args{'non_lazy_fields'}) { }
567 0 0 if ($DEBUG > 1)
584 0 0 ref $$metadata{'primary_key'} eq 'ARRAY' ? :
588 0 0 if ($$args{'db_class'}) { }
608 0 0 if ($fields) { }
609 0 0 unless (ref $fields eq 'ARRAY' or ref $fields eq 'HASH')
611 0 0 if (ref $fields eq 'ARRAY')
612 0 0 unless (%$fields)
615 0 0 unless ($dbc->can('column_info'))
621 0 0 unless (keys %{$fields;})
633 0 0 unless (exists $$fields{$pk})
642 0 0 if ($$args{'volatile_fields'})
653 0 0 if ($refreshes and ref $refreshes ne 'ARRAY')
659 0 0 unless (grep {$_ eq $pk;} @{$refreshes;})
668 0 0 unless (exists $$fields{$rf})
705 0 0 if ($aggregator_name)
720 0 0 unless ($registry_class->isa('Class::ReluctantORM::Registry'))
738 0 0 if (@_)
754 0 0 ref $inv ? :
761 0 0 ref $inv ? :
764 0 0 unless (defined $hash)
797 0 0 if (ref $cro_inv)
803 0 0 unless ($reg_arg->isa('Class::ReluctantORM::Registry'))
811 0 0 unless (ref $reg_arg)
853 0 0 unless ($name)
869 0 0 $class->schema_name ? :
892 0 0 @_ > 1 ? :
0 0 wantarray ? :
910 0 0 @_ > 1 ? :
0 0 wantarray ? :
937 0 0 wantarray ? :
977 0 0 wantarray ? :
1023 0 0 if (exists $columns{$c}) { }
0 0 elsif (exists $columns_by_fields{$c}) { }
1218 0 0 if (@_ == 1) { }
0 0 elsif (@_ % 2) { }
1220 0 0 unless (ref $hash_ref eq 'HASH')
1227 0 0 if ($DEBUG > 1)
1231 0 0 unless (grep {$arg eq $_;} @allowable_args)
1242 0 0 if ($self->has_all_primary_keys_defined)
1244 0 0 if ($existing)
1252 0 0 unless ($existing)
1256 0 0 if (exists $$hash_ref{$f})
1257 0 0 if ($DEBUG > 1)
1261 0 0 if ($DEBUG > 1)
1267 0 0 unless exists $$hash_ref{$rel_field}
1268 0 0 if ($existing and $existing->is_fetched($rel_field)) { }
1323 0 0 if (not @_) { }
0 0 elsif (@_ == 1) { }
0 0 elsif (@_ % 2) { }
1326 0 0 unless ($class->primary_key_column_count == 1)
1446 0 0 if (@_ == 1)
1447 0 0 unless (@{[$class->primary_key_columns];} == 1)
1457 0 0 if (@_ % 2)
1460 0 0 if (exists $args{'with'})
1561 0 0 if (@pk_fields == 1) { }
1563 0 0 wantarray ? :
1565 0 0 if (wantarray) { }
1566 0 0 unless ($self->is_inserted)
1569 0 0 unless ($self->is_inserted)
1586 0 0 unless (defined $self->raw_field_value($pkf))
1614 0 0 unless ($self->insertable)
1619 0 0 if ($self->is_inserted)
1639 0 0 if ($DEBUG > 2)
1641 0 0 defined $val ? :
1683 0 0 if ($oc->expression->is_column)
1729 0 0 unless ($self->updatable)
1734 0 0 unless ($self->is_inserted)
1741 0 0 unless ($self->is_dirty)
1785 0 0 unless $rel->local_key_fields
1787 0 0 unless $self->is_relation_fetched($field)
1789 0 0 if ref $related and $related->isa('Class::ReluctantORM::Collection')
1790 0 0 unless ref $related and $related->isa('Class::ReluctantORM')
1791 0 0 unless ($related->is_inserted)
1830 0 0 unless ($self->is_dirty)
1834 0 0 if ($self->is_inserted) { }
1858 0 0 unless ($self->deletable)
1863 0 0 unless ($self->is_inserted)
1900 0 0 if (@_ % 2)
1902 0 0 unless (exists $args{'where'})
1905 0 0 unless ($class->deletable)
1915 0 0 if (UNIVERSAL::isa($args{'where'}, Where())) { }
1919 0 0 unless $args{'execargs'}
1933 0 0 if ($self and $self->registry)
2015 0 0 if (@_)
2087 0 0 if (defined $field and not defined $value)
2095 0 0 if (ref $field eq 'ARRAY') { }
0 0 elsif ($field) { }
2099 0 0 unless (ref $value eq 'ARRAY')
2102 0 0 unless (@$value == @$field)
2113 0 0 $root_crit ? :
2129 0 0 unless (wantarray)
2139 0 0 if ($rel_name)
2143 0 0 unless (@results)
2144 0 0 if ($fatal)
2145 0 0 wantarray ? :
2148 0 0 wantarray ? :
2171 0 0 if (@_) { }
2174 0 0 if (nz($self->get($field), 'UNDEF') ne nz($new_val, 'UNDEF')) { }
2181 0 0 if (grep {$_ eq $field;} $rel->local_key_fields)
2213 0 0 if (not $where) { }
0 0 elsif (UNIVERSAL::isa($where, Where())) { }
2216 0 0 unless $args{'execargs'}
2220 0 0 unless $args{'execargs'}
2254 0 0 if ($method_maker) { }
2257 0 0 unless $METHOD_GENERATORS{$class}
2258 0 0 if $method_body_coderef = &$generator($class, $method_name)
2261 0 0 unless ($method_body_coderef)
2284 0 1 unless ('Class::ReluctantORM'->can('__apply_field_read_filters'))
2287 0 1 unless ('Class::ReluctantORM'->can('__apply_field_write_filters'))
2344 0 0 if (my $rel = $self->relationships($field)) { }
2347 0 0 if (@_)
2361 0 1 unless ('Class::ReluctantORM'->can('capture_origin'))
2364 0 1 unless ('Class::ReluctantORM'->can('is_origin_tracking_enabled'))
2399 0 0 if ($field)
2400 0 0 wantarray ? :
2435 0 0 if ($rel) { }
2483 0 0 unless ($rel->isa('Class::ReluctantORM::Relationship'))
2493 0 0 unless $rel->_original_args_arrayref
2516 0 0 if $JOIN_TABLE_CACHE{'cache_initted'}
2520 0 0 if ($jst)
2526 0 0 if ($ENABLE_JOIN_CACHE)
2535 0 0 $args{'table_obj'} ? :
2536 0 0 $args{'table_obj'} ? :
2541 0 0 if ($class->_find_class_by_table(%args))
2546 0 0 if ($schema_name) { }
2552 0 0 $result ? :
2559 0 0 $args{'table_obj'} ? :
2560 0 0 $args{'table_obj'} ? :
2565 0 0 if ($schema_name) { }
2571 0 0 unless ($rel)
2580 0 0 $args{'table_obj'} ? :
2581 0 0 $args{'table_obj'} ? :
2586 0 0 if ($table_name eq $cc_table and !$schema_name || $schema_name eq $cc_schema)
2601 0 0 if $RELATIONSHIP_CACHE{'initted'}
2605 0 0 if ($lt)
2613 0 0 if ($jt)
2621 0 0 if ($rt)
2637 0 0 $args{'table_obj'} ? :
2638 0 0 $args{'table_obj'} ? :
2642 0 0 if ($schema_name) { }
2643 0 0 unless $RELATIONSHIP_CACHE{'by_local'}{'by_schema'}{$schema_name}{$table_name}
2645 0 0 unless $RELATIONSHIP_CACHE{'by_local'}{'by_table'}{$table_name}
2653 0 0 $args{'table_obj'} ? :
2654 0 0 $args{'table_obj'} ? :
2658 0 0 if ($schema_name) { }
2659 0 0 unless $RELATIONSHIP_CACHE{'by_remote'}{'by_schema'}{$schema_name}{$table_name}
2661 0 0 unless $RELATIONSHIP_CACHE{'by_remote'}{'by_table'}{$table_name}
2669 0 0 $args{'table_obj'} ? :
2670 0 0 $args{'table_obj'} ? :
2674 0 0 if ($schema_name) { }
2675 0 0 unless $RELATIONSHIP_CACHE{'by_join'}{'by_schema'}{$schema_name}{$table_name}
2677 0 0 unless $RELATIONSHIP_CACHE{'by_join'}{'by_table'}{$table_name}
2700 0 0 unless ($mon)
2701 0 0 unless (UNIVERSAL::isa($mon, 'Class::ReluctantORM::Monitor'))
2845 0 0 ref $inv ? :
2846 0 0 unless (@_ > 1)
2847 0 0 if (@_ > 2)
2849 0 0 unless (exists $TRIGGER_EVENTS{$event})
2852 0 0 unless (ref $coderef eq 'CODE')
2871 0 0 ref $inv ? :
2872 0 0 unless (@_ > 1)
2873 0 0 if (@_ > 2)
2875 0 0 unless (exists $TRIGGER_EVENTS{$event})
2878 0 0 unless (ref $coderef eq 'CODE')
2901 0 0 ref $inv ? :
2902 0 0 if (@_ > 1)
2908 0 0 if ($event) { }
2909 0 0 unless (exists $TRIGGER_EVENTS{$event})
2926 0 0 ref $inv ? :
2927 0 0 if (@_ < 1)
2928 0 0 if (@_ > 1)
2931 0 0 unless (exists $TRIGGER_EVENTS{$event})
2944 0 0 unless (exists $TRIGGER_EVENTS{$event})
2951 0 0 if ($self->can($method))
2957 0 0 unless $class->__metadata->{'triggers'}{$event}