Branch Coverage

blib/lib/DBIx/Class/Schema.pm
Criterion Covered Total %
branch 77 108 71.3


line true false branch
158 17 3 unless $name =~ s/^\+//
211 3 5 if $default_resultset_class
215 0 8 if scalar keys %args
219 15 1 if $arg and not ref $arg
221 0 16 if ref $arg ne 'ARRAY'
262 2 113 if ($preset_resultset_class and $preset_resultset_class ne 'DBIx::Class::ResultSet') { }
9 104 elsif ($found_resultset_class ||= $default_resultset_class) { }
263 0 2 if ($found_resultset_class and $found_resultset_class ne $preset_resultset_class)
272 2 7 unless ($found_resultset_class->isa('DBIx::Class::ResultSet'))
343 329 1 if (@params) { }
345 0 12965 if (ref $param eq 'ARRAY') { }
324 12641 elsif (ref $param eq 'HASH') { }
362 11993 648 unless $param =~ /^#/
378 0 330 unless $comps_for{$prefix}
383 1 14962 unless ($snsub)
545 1 9081 unless defined $source_name
586 1 83148 unless @_
592 66849 16299 if exists $sreg->{$source_name}
597 9 16290 unless $mapped and exists $sreg->{$mapped}
651 24 442 unless $self->storage
667 0 1107 unless $self->storage
684 0 12 unless $self->storage
701 0 5 unless $self->storage
718 0 6 unless $self->storage
769 0 7611 unless my $rs = $self->resultset($name)
797 0 444 if not @info and $self->storage
799 0 444 ref $self->storage_type ? :
823 0 0 if (ref $storage_type eq 'ARRAY') { }
0 0 elsif (ref $storage_type eq 'HASH') { }
912 18449 0 if ($target_class->can('result_source_instance'))
948 0 17 unless $self->storage
965 0 6 unless $self->storage
982 0 12 unless $self->storage
1009 405 437 ref $self ? :
1 841 @_ == 1 && ref $_[0] eq 'HASH' ? :
1036 6 836 if ($from->storage)
1060 7 2737 if (my $act = $self->exception_action)
1065 6 1 if $guard_disarmed
1087 1 2 if (&$act(@args)) { }
1108 3 3 unless (eval { do { if (&$act(@args)) { $args[0] = "Invocation of the exception_action handler installed on $self did *not*" . ' result in an exception. DBIx::Class is unable to function without a reliable' . ' exception mechanism, ensure that exception_action does not hide exceptions' . " (original error: $args[0])"; } else { carp_unique("The exception_action handler installed on $self returned false instead" . ' of throwing an exception. This behavior has been deprecated, adjust your' . ' handler to always rethrow the supplied error'); } ; $guard_disarmed = 1 } })
1146 0 0 unless $self->storage
1170 0 1 unless $self->storage
1195 0 0 unless $self->storage
1238 0 1 if $preversion
1395 57105 15086 if ref $self
1401 38649 33542 if $params->{'extra'}
1404 33540 2 if ($rs_class and my $rsrc = &try(sub { $rs_class->result_source_instance; } ))
1406 1 50 if (exists $map{$rs_class} and $map{$rs_class} ne $source_name and $rsrc ne $_[2])
1432 0 856 if $global_phase_destroy ||= &in_global_destruction()
1445 15 38993 if (length ref $srcs->{$source_name} and &refcount($srcs->{$source_name}) > 1)
1451 0 15 unless (eval { do { $srcs->{$source_name}->schema($self); &weaken($srcs->{$source_name}); 1 } })
1466 2 0 if ($source->result_class)
1512 1 0 unless $INC{'DBIx/Class/CDBICompat.pm'}
1523 0 1 if ($self eq $target)