Branch Coverage

blib/lib/Catalyst/Authentication/Store/LDAP/Backend.pm
Criterion Covered Total %
branch 41 68 60.2


line true false branch
111 0 14 unless (defined $config and ref $config eq 'HASH')
125 1 13 unless exists $config_hash{'use_roles'}
133 0 14 unless $config_hash{'persist_in_session'} =~ /\A(?:username|all)\z/
183 4 11 if (defined $self->ldap_server_options) { }
186 0 4 unless $ldap = 'Net::LDAP'->new($self->ldap_server, %{$self->ldap_server_options;})
190 0 11 unless $ldap = 'Net::LDAP'->new($self->ldap_server)
193 0 15 if (defined $self->start_tls and $self->start_tls =~ /(1|true)/i)
195 0 0 if (defined $self->start_tls_options) { }
201 0 0 if ($mesg->is_error)
221 0 20 unless (defined $ldap)
227 19 1 unless (defined $binddn)
232 19 1 if ($binddn eq 'anonymous') { }
236 1 0 if ($bindpw) { }
238 0 1 if ($mesg->is_error)
253 0 19 if ($mesg->is_error)
269 0 3 unless (defined $ldap)
273 0 3 $mesg->is_error ? :
305 18 0 if (defined $self->user_basedn) { }
315 0 18 if (defined $self->user_search_options)
320 2 16 if $usersearch->is_error
326 0 16 if (defined $results_filter) { }
332 0 16 if ($usersearch->pop_entry)
343 16 0 if (defined $entry)
344 0 16 unless (lc $entry->get_value($user_field) eq lc $id)
354 0 16 unless ($userentry)
360 60 14 if (scalar @attrvalues == 1) { }
369 16 0 unless ($@)
394 1 2 if ($self->use_roles == 0 or $self->use_roles =~ /^false$/i)
397 1 1 $self->role_search_as_user ? :
400 2 0 if (defined $self->role_basedn) { }
408 0 2 unless (defined $filter_value)
419 0 2 if (defined $self->role_search_options)
467 2 3 if (ref $frozenuser eq 'HASH')
469 2 0 if ($frozenuser->{'persist_in_session'} eq 'all')