Branch Coverage

lib/Hypersonic/Session.pm
Criterion Covered Total %
branch 35 78 44.8


line true false branch
51 0 5 if $COMPILED
55 0 5 if ($@)
57 0 0 if $ENV{'HYPERSONIC_DEBUG'}
62 5 0 unless ($has_openssl)
64 0 5 if $ENV{'HYPERSONIC_DEBUG'}
72 0 0 unless ($extra_cflags =~ /-I/)
74 0 0 if $ENV{'HYPERSONIC_DEBUG'}
317 0 0 if ($@)
319 0 0 if $ENV{'HYPERSONIC_DEBUG'}
335 0 6 if ($COMPILED and defined &Hypersonic::Session::_jit_generate_session_id)
343 6 0 if (-r '/dev/urandom') { }
344 0 6 unless open my $fh, "<:raw", "/dev/urandom"
360 0 4 if ($COMPILED and defined &Hypersonic::Session::_jit_hmac_sha256_hex)
375 0 5 if ($COMPILED and defined &Hypersonic::Session::_jit_verify_signature)
380 1 4 unless $signed_cookie and $signed_cookie =~ /^([a-f0-9]{32})\.([a-f0-9]{16})$/
386 0 4 unless length $sig == length $expected
390 2 2 $diff == 0 ? :
398 0 0 if ($COMPILED and defined &Hypersonic::Session::_jit_constant_time_compare)
403 0 0 unless defined $s1 and defined $s2
404 0 0 unless length $s1 == length $s2
409 0 0 $diff == 0 ? :
420 2 5 unless $opts{'secret'} and length $opts{'secret'} >= 16
423 5 0 unless $COMPILED
446 0 4 unless my $config = $SESSION_CONFIG
453 1 3 if ($signed_cookie)
457 1 0 if ($session_id and exists $SESSION_STORE{$session_id})
463 3 1 unless ($session_id and $data)
483 0 2 unless my $config = $SESSION_CONFIG
491 2 0 if ($session_id and $is_new || $modified)
492 2 0 if $data
507 2 0 if $data
524 0 5 if ($COMPILED and defined &Hypersonic::Session::_jit_session_get_set)
525 0 0 @_ == 2 ? :
532 0 5 unless $data
534 4 1 if (@_ == 2) { }
550 0 1 if ($COMPILED and defined &Hypersonic::Session::_jit_session_get_all)
562 1 0 if $session_id
576 1 0 if $old_id
597 1 0 if ($data and $data->{'_created'} and $data->{'_created'} < $cutoff)