Condition Coverage

blib/lib/CGI/Application/Plugin/Authentication.pm
Criterion Covered Total %
condition 83 109 76.1


and 3 conditions

line !l l&&!r l&&r condition
553 29 101 1 ref $self and defined $$self{'initialized'}
568 2 82 1 ref $$props{'DRIVER'} and &Scalar::Util::reftype($$props{'DRIVER'}) ne 'ARRAY'
581 28 58 1 ref $$props{'STORE'} and &Scalar::Util::reftype($$props{'STORE'}) ne 'ARRAY'
640 1 20 1 ref $$props{'CREDENTIALS'} and &Scalar::Util::reftype($$props{'CREDENTIALS'}) ne 'ARRAY'
650 7 12 1 ref $$props{'LOGIN_SESSION_TIMEOUT'} and ref $$props{'LOGIN_SESSION_TIMEOUT'} ne 'HASH'
771 146 0 8 ref $runmode_test and ref $runmode_test eq 'CODE'
788 8 9 2 $sub and $RUNMODES{$sub}
1139 0 0 164 $$config{'STORE'} and ref $$config{'STORE'} eq 'ARRAY'
1142 0 0 0 $self->_cgiapp->can('session') and UNIVERSAL::isa($self->_cgiapp->session, 'CGI::Session')
1223 44 0 0 $$login_config{'REMEMBERUSER_OPTION'} and $query->param('authen_rememberuser')
1248 143 4 5 $$config{'LOGIN_SESSION_TIMEOUT'} and not $$self{'is_new_login'}
147 1 4 $$config{'LOGIN_SESSION_TIMEOUT'} and not $$self{'is_new_login'} and $self->username
1250 2 1 1 $$config{'LOGIN_SESSION_TIMEOUT'}{'IDLE_FOR'} and time - $self->last_access >= $$config{'LOGIN_SESSION_TIMEOUT'}{'IDLE_FOR'}
1 1 1 $$config{'LOGIN_SESSION_TIMEOUT'}{'EVERY'} and time - $self->last_login >= $$config{'LOGIN_SESSION_TIMEOUT'}{'EVERY'}
0 1 1 $$config{'LOGIN_SESSION_TIMEOUT'}{'CUSTOM'} and $$config{'LOGIN_SESSION_TIMEOUT'}{'CUSTOM'}($self)
1337 1 1 2090 defined $cgiapp and UNIVERSAL::isa($cgiapp, 'CGI::Application')
1462 155 2 4 $destination and $destination =~ /$regexp/
1599 18 10 1 !$2 || $2 eq 's' and $1 != int $1

or 2 conditions

line l !l condition
34 0 1 $data || 1
38 1 0 $data || 1
752 233 70 $$config{'PROTECTED_RUNMODES'} ||= []
1061 77 126 $$config{'CREDENTIALS'} || ['authen_username', 'authen_password']
1107 195 1 _find_deligate_class('CGI::Application::Plugin::Authentication::Driver::' . $drivername, $drivername) || die('Driver ' . $drivername . ' can not be found')
1113 194 1 $driver_class->new($self, @params) || die("Could not create new $driver_class object")
1152 164 0 _find_deligate_class('CGI::Application::Plugin::Authentication::Store::' . $store_module, $store_module) || die("Store $store_module can not be found")
1158 163 0 $store_class->new($self, @store_config) || die("Could not create new $store_class object")
1205 63 102 $$config{'CREDENTIALS'} || ['authen_username', 'authen_password']
1222 4 40 $$config{'LOGIN_FORM'} || {}
1224 0 0 $$login_config{'REMEMBERUSER_COOKIENAME'} || 'CAPAUTHTOKEN'
1236 4 69 $store->fetch('login_attempts') || 0
1279 21 76 $self->_config->{'LOGIN_FORM'} || {}
1280 6 91 $$config{'DISPLAY_CLASS'} || 'Classic'
1500 62 43 $query->param($username) || $query->cookie($cookiename) || ''
1526 124 99 $__CONFIG{$class} || {}
1528 11 18 $__CONFIG{$class} ||= {}
1542 0 0 $$config{'CREDENTIALS'} || ['authen_username', 'authen_password']
1545 0 0 $query->param($name) || ''
1600 19 9 $mult{$2} || 1

or 3 conditions

line l !l&&r !l&&!r condition
909 0 0 151 $$config{'LOGIN_RUNMODE'} or $$config{'LOGIN_URL'}
911 0 0 151 $$config{'LOGOUT_RUNMODE'} or $$config{'LOGOUT_URL'}
1398 0 107 0 $run_mode ||= $self->get_current_runmode
1526 2249 223 0 $$self{'__CAP_AUTHENTICATION_CONFIG'} ||= $__CONFIG{$class} || {}
1599 10 1 18 !$2 || $2 eq 's'