Branch Coverage

blib/lib/Elive/Entity/Participant.pm
Criterion Covered Total %
branch 16 54 29.6


line true false branch
72 106 106 if (&Scalar::Util::blessed($_))
74 0 106 if (try sub { $_->isa('Elive::Entity::User'); } )
85 0 106 if (try sub { $_->isa('Elive::Entity::Group'); } )
96 0 106 if (try sub { $_->isa('Elive::Entity::InvitedGuest'); } )
109 153 59 if ($reftype eq 'HASH')
114 153 0 if ($spec{'user'}) { }
0 0 elsif ($spec{'group'}) { }
0 0 elsif ($spec{'guest'}) { }
124 153 0 if defined $spec{'type'}
127 0 59 if ($reftype)
128 0 0 if 'Elive'->debug
144 0 59 if (/^ \s* ([^;]*?) # display name \s* \( ([^;\)]+) \) # (login name) \s* (= (\d) \s*)? # possible '=role' (ignored) $/x) { }
59 0 elsif (m[^ \s* (\*?) # optional group indicator '*' \s* ([^,]*?) # user/group id \s* (= (\d) \s*)? # optional '=role' $]x) { }
169 52 7 unless defined $roleId and $roleId ne ''
172 0 59 if ($is_group) { }
208 0 0 $self->type == $TYPE_GUEST ? :
0 0 $self->type == $TYPE_GROUP ? :
0 0 !defined($self->type) || $self->type == $TYPE_USER ? :
209 0 0 unless $self->user or $self->group
229 0 0 if (defined $self->type and $self->type == $TYPE_GUEST)
235 0 0 if (@_) { }
237 0 0 $is_moderator ? :
241 0 0 unless $role_id == $self->role->stringify
266 106 0 if (not defined $$data{'type'} or $$data{'type'} == $TYPE_USER) { }
0 0 elsif ($$data{'type'} == $TYPE_GUEST) { }
0 0 elsif ($$data{'type'} == $TYPE_GROUP) { }
274 0 0 if defined $role_id and $role_id != $Elive::Entity::Role::PARTICIPANT