Branch Coverage

File:C4/Context.pm
Coverage:16.9%

line%coveragebranch
2450TFif ($ENV{'HTTP_USER_AGENT'})
330TFif ($@) { }
460TFif ($debug_level eq '2') { }
0TFelsif ($debug_level eq '1') { }
770TFif ($ENV{'KOHA_BACKTRACES'})
8450TFif ($servers)
2160TFif (-d $cgidir . '/cgi-bin')
2200TFunless do $cgidir . '/kohaversion.pl'
25150TFif ($ismemcached)
2760TFif ($ismemcached) { }
2920TFif (/mysql/)
2930TFif (/Postgres|Pg|PostgresSQL/)
2940TFif (/oracle/)
305100TFif $context
31050TFunless $new_ctx
34450TFunless defined $conf_fname and -s $conf_fname
34750TFif (not defined $conf_fname)
35150TFif (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') { }
36550TFif ($ismemcached) { }
3680TFif (not defined $self)
37850TFif not defined $$self{'config'}
37950TFif not defined $$self{'config'}
42650TFif (ref $self eq '') { }
43650TFif defined $context
4550TFif ($#context_stack < 0)
48650TFif not defined $$context{$term}
53150TFif (exists $sysprefs{$var})
53550TFunless my $dbh = 'C4::Context'->dbh
5520TFdefined $it ? :
5830TFunless my $dbh = 'C4::Context'->dbh
5870TFif $type and $type eq 'YesNo' and $value eq ''
5960TFif ($sth->execute($var, $value))
6460TFif (defined $$context{'Zconn'}{$server} and 0 == $$context{'Zconn'}{$server}->errcode) { }
6560TFif defined $$context{'Zconn'}{$server}
6820TFunless $server
6830TFunless $syntax
6890TFif $user and $password
6940TFif $auth
6950TFif $auth
6960TFif $async
6970TFif $piggyback
7020TF$servername ? :
7110TFif ($Zconn->errcode != 0)
74650TFif ($context->config('db_scheme')) { }
75850TF$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})
76150TFif ($db_driver eq 'mysql') { }
0TFelsif ($db_driver eq 'Pg') { }
76650TFif $tz
7700TFif $tz
79650TFif (defined $$context{'dbh'} and $$context{'dbh'}->ping)
8720TFif ($#{$$context{'dbh_stack'};} < 0)
9020TFif defined $$context{'marcfromkohafield'}
9430TFif defined $$context{'stopwords'}
9630TFunless $stopwordlist
98150TFif defined $var and defined $$context{'userenv'}{$var}
9830TFif ($$context{'dbh'} and $context->preference('insecure') eq 'yes') { }
10310TFunless my($type, $shelves) = @_
10320TFunless my $activeuser = $$context{'activeuser'}
10330TFif $type eq 'bar'
10340TFif $type eq 'pub'
10350TFif $type eq 'tot'
10400TFunless ($active = $$context{'userenv'}{$$context{'activeuser'}})
10410TFif $debug
10440TFunless my $totshelves = $$active{'totshelves'}
10450TFunless my $pubshelves = $$active{'pubshelves'}
10460TFunless my $barshelves = $$active{'barshelves'}
10840TFif $$context{'activeuser'} eq $sessionID
11090TFunless $versions{'apacheVersion'}
11100TFunless $versions{'apacheVersion'}
11110TFunless $versions{'apacheVersion'}
1127100TFif (not defined $$context{'tz'})