Branch Coverage

blib/lib/AuthCAS.pm
Criterion Covered Total %
branch 20 66 30.3


line true false branch
220 0 0 if (ref $var) { }
221 0 0 if (ref $var eq 'ARRAY') { }
0 0 elsif (ref $var eq 'HASH') { }
235 0 0 if (defined $var) { }
250 3 0 if ($url =~ m[^(https?)://([^:/]+)(:(\d+))?(.*)$]) { }
253 0 3 if ($1 eq 'http') { }
3 0 elsif ($1 eq 'https') { }
287 0 0 if ($new_data =~ m[^<([^\s>]+)(\s+[^\s>]+)*>([\s\S\n]*)()]m) { }
378 0 3 if (defined $pgtUrl)
452 1 4 unless (defined $service)
456 1 3 unless (defined $ticket)
467 0 3 if (defined $xml->{'cas:serviceResponse'}[0]{'cas:authenticationFailure'})
480 0 3 if ($self->{'proxy'})
482 0 0 if (defined $xml->{'cas:serviceResponse'}[0]{'cas:authenticationSuccess'}[0]{'cas:proxyGrantingTicket'})
491 0 0 unless (defined $self->{'pgtFile'})
497 0 0 unless (open STORE, $self->{'pgtFile'})
504 0 0 if (/^$pgtIou\s+(.+)$/)
534 0 0 unless (defined $service)
538 0 0 unless (defined $ticket)
546 0 0 if (defined $xml->{'cas:serviceResponse'}[0]{'cas:authenticationFailure'})
558 0 0 if (defined $xml->{'cas:serviceResponse'}[0]{'cas:authenticationSuccess'}[0]{'cas:proxies'})
597 3 0 unless ($xml and $#$xml >= 0)
622 0 0 unless (open STORE, ">>$self->{'pgtFile'}")
647 0 0 if (defined $xml->{'cas:serviceResponse'}[0]{'cas:proxyFailure'})
653 0 0 if (defined $xml->{'cas:serviceResponse'}[0]{'cas:proxySuccess'}[0]{'cas:proxyTicket'})
686 1 2 if ($trusted_ca_file and not -r $trusted_ca_file or $trusted_ca_path and not -d $trusted_ca_path)
694 0 2 unless (eval 'require IO::Socket::SSL')
701 0 2 unless (eval 'require LWP::UserAgent')
718 0 2 if $trusted_ca_file
719 0 2 if $trusted_ca_path
722 0 2 if $trusted_ca_file or $trusted_ca_path
726 2 0 if defined $ssl_data->{'SSL_version'}
730 2 0 unless ($ssl_socket)