Branch Coverage

File:C4/Context.pm
Coverage:11.0%

line%coveragebranch
2450TFif ($ENV{'HTTP_USER_AGENT'})
330TFif ($@) { }
460TFif ($debug_level eq '2') { }
0TFelsif ($debug_level eq '1') { }
770TFif ($ENV{'KOHA_BACKTRACES'})
8450TFif ($servers)
2150TFif (-d $cgidir . '/cgi-bin')
2190TFunless do $cgidir . '/kohaversion.pl'
25050TFif ($ismemcached)
2750TFif ($ismemcached) { }
2910TFif (/mysql/)
2920TFif (/Postgres|Pg|PostgresSQL/)
2930TFif (/oracle/)
304100TFif $context
30950TFunless $new_ctx
34350TFunless defined $conf_fname and -s $conf_fname
34650TFif (not defined $conf_fname)
35050TFif (exists $ENV{'KOHA_CONF'} and $ENV{'KOHA_CONF'} and -s $ENV{'KOHA_CONF'}) { }
0TFelsif (not $INSTALLED_CONFIG_FNAME =~ /__KOHA_CONF_DIR/ and -s $INSTALLED_CONFIG_FNAME) { }
0TFelsif (-s '/etc/koha/koha-conf.xml') { }
36450TFif ($ismemcached) { }
3670TFif (not defined $self)
37750TFif not defined $$self{'config'}
37850TFif not defined $$self{'config'}
42450TFif (ref $self eq '') { }
43450TFif defined $context
4530TFif ($#context_stack < 0)
48450TFif not defined $$context{$term}
5290TFif (exists $sysprefs{$var})
5330TFunless my $dbh = 'C4::Context'->dbh
5500TFdefined $it ? :
5810TFunless my $dbh = 'C4::Context'->dbh
5850TFif $type and $type eq 'YesNo' and $value eq ''
5940TFif ($sth->execute($var, $value))
6440TFif (defined $$context{'Zconn'}{$server} and 0 == $$context{'Zconn'}{$server}->errcode) { }
6540TFif defined $$context{'Zconn'}{$server}
6800TFunless $server
6810TFunless $syntax
6870TFif $user and $password
6920TFif $auth
6930TFif $auth
6940TFif $async
6950TFif $piggyback
7000TF$servername ? :
7090TFif ($Zconn->errcode != 0)
7440TFif ($context->config('db_scheme')) { }
7560TF$ENV{'DEBUG'} ? :
0TFunless my $dbh = 'DBI'->connect("DBI:${db_driver}:dbname=$db_name;host=$db_host;port=$db_port", $db_user, $db_passwd, {'RaiseError', $ENV{'DEBUG'} ? 1 : 0})
7590TFif ($db_driver eq 'mysql') { }
0TFelsif ($db_driver eq 'Pg') { }
7640TFif $tz
7680TFif $tz
7940TFif (defined $$context{'dbh'} and $$context{'dbh'}->ping)
8700TFif ($#{$$context{'dbh_stack'};} < 0)
9000TFif defined $$context{'marcfromkohafield'}
9410TFif defined $$context{'stopwords'}
9610TFunless $stopwordlist
97950TFif defined $var and defined $$context{'userenv'}{$var}
9810TFif ($$context{'dbh'} and $context->preference('insecure') eq 'yes') { }
10290TFunless my($type, $shelves) = @_
10300TFunless my $activeuser = $$context{'activeuser'}
10310TFif $type eq 'bar'
10320TFif $type eq 'pub'
10330TFif $type eq 'tot'
10380TFunless ($active = $$context{'userenv'}{$$context{'activeuser'}})
10390TFif $debug
10420TFunless my $totshelves = $$active{'totshelves'}
10430TFunless my $pubshelves = $$active{'pubshelves'}
10440TFunless my $barshelves = $$active{'barshelves'}
10820TFif $$context{'activeuser'} eq $sessionID
11070TFunless $versions{'apacheVersion'}
11080TFunless $versions{'apacheVersion'}
11090TFunless $versions{'apacheVersion'}