Branch Coverage

lib/UR/Singleton.pm
Criterion Covered Total %
branch 36 40 90.0


line true false branch
17 15353 2 ref $self ? :
28 799 1223 if ($class_meta_object->is_abstract) { }
48 317 9074 unless $UR::Context::DefaultRoot::singleton
300 8533 unless $UR::singleton
0 0 unless $UR::DataSource::Default::singleton
49 0 2022 if $@
62 131 4749 unless (defined $id)
69 112 3834 if ($@)
80 14861 3184 if (@_ == 1 or @_ == 2 and $_[0] eq $_[1])
82 14933 5321 if $self
88 1199 1490 if (@_ == 1 or @_ == 2 and $_[0] eq $_[1])
91 1200 2148 if $self
102 1174 2 unless ($$varref)
110 13 5710 unless $prop
112 3179 2190 unless defined $val
122 1 1173 unless $self
123 2 1175 unless ($self->init)
143 1 0 if ${$class . '::singleton';} eq $self
165 2 148 unless (defined $id)
170 2 3 unless ($subclass->isa('UR::Singleton'))