Branch Coverage

blib/lib/MyLibrary/Patron.pm
Criterion Covered Total %
branch 39 174 22.4


line true false branch
320 0 2 if ($opts{'id'}) { }
0 2 elsif ($opts{'username'}) { }
325 0 0 if (ref $rv eq 'HASH') { }
334 0 0 if (ref $rv eq 'HASH') { }
347 1 1 if ($email) { }
354 2 1 if ($name_first) { }
361 2 1 if ($name_last) { }
367 1 1 if ($image) { }
373 1 1 if ($url) { }
379 1 1 if ($password) { }
390 1 1 if ($address_1) { }
397 1 1 if ($address_2) { }
403 1 1 if ($address_3) { }
409 1 1 if ($address_4) { }
416 1 1 if ($address_5) { }
422 1 1 if ($patron_can_contact) { }
428 1 1 if ($wants_cookie) { }
435 1 1 if ($username) { }
441 1 1 if ($organization) { }
447 1 1 if ($last_visit) { }
454 1 1 if ($total_visits) { }
461 2 1 if ($stylesheet_id) { }
477 0 0 if ($self->patron_id) { }
481 0 0 if ($return > 1 or not $return)
487 0 0 if ($return > 1 or not $return)
501 0 0 if ($opts{'new'})
505 0 0 if ($opts{'del'})
510 0 0 if ($opts{'sort'})
511 0 0 if ($opts{'sort'} eq 'name')
516 0 0 unless ($self->patron_id =~ /^\d+$/)
523 0 0 if ($opts{'strict'}) { }
524 0 0 if ($opts{'strict'} == 1) { }
0 0 elsif ($opts{'strict'} == 0) { }
0 0 elsif (not $opts{'strict'} =~ /^\d$/ and $opts{'strict'} == 1 || $opts{'strict'} == 0 or $opts{'strict'} ne 'off' or $opts{'strict'} ne 'on') { }
537 0 0 if (@new_related_resources)
540 0 0 unless ($new_related_resource =~ /^\d+$/)
545 0 0 if ($strict_relations eq 'on')
547 0 0 unless (scalar @resource_array)
554 0 0 if (scalar @resource_association) { }
558 0 0 if ($return > 1 or not $return)
563 0 0 if (@del_related_resources)
571 0 0 if ($opts{'sort'}) { }
585 0 0 unless ($opts{'link_name'} and $opts{'link_url'})
601 0 0 unless ($opts{'link_id'})
621 0 0 if (scalar @return_objects >= 1) { }
634 0 0 if ($opts{'new'})
638 0 0 if ($opts{'del'})
643 0 0 if ($opts{'sort'})
644 0 0 if ($opts{'sort'} eq 'name')
649 0 0 unless ($self->patron_id =~ /^\d+$/)
656 0 0 if ($opts{'strict'}) { }
657 0 0 if ($opts{'strict'} == 1) { }
0 0 elsif ($opts{'strict'} == 0) { }
0 0 elsif (not $opts{'strict'} =~ /^\d$/ and $opts{'strict'} == 1 || $opts{'strict'} == 0 or $opts{'strict'} ne 'off' or $opts{'strict'} ne 'on') { }
670 0 0 if (@new_related_terms)
673 0 0 unless ($new_related_term =~ /^\d+$/)
678 0 0 if ($strict_relations eq 'on')
680 0 0 unless (scalar @term_array)
687 0 0 if (scalar @term_association) { }
691 0 0 if ($return > 1 or not $return)
696 0 0 if (@del_related_terms)
704 0 0 if ($opts{'sort'}) { }
722 0 0 unless ($opts{'action'})
727 0 0 if ($opts{'strict'}) { }
728 0 0 if ($opts{'strict'} == 1) { }
0 0 elsif ($opts{'strict'} == 0) { }
0 0 elsif (not $opts{'strict'} =~ /^\d$/ and $opts{'strict'} == 1 || $opts{'strict'} == 0 or $opts{'strict'} ne 'off' or $opts{'strict'} ne 'on') { }
741 0 0 if ($opts{'action'} eq 'increment') { }
0 0 elsif ($opts{'action'} eq 'resource_usage_count') { }
0 0 elsif ($opts{'action'} eq 'absolute_usage_count') { }
0 0 elsif ($opts{'action'} eq 'patron_usage_count') { }
0 0 elsif ($opts{'action'} eq 'patron_resource_count') { }
743 0 0 unless ($opts{'patron'} and $opts{'patron'})
747 0 0 unless ($opts{'patron'} =~ /^\d+$/)
751 0 0 unless ($opts{'resource'} =~ /^\d+$/)
759 0 0 if ($return > 1 or not $return)
764 0 0 if (not $zero_count) { }
769 0 0 if ($return > 1 or not $return)
775 0 0 unless ($opts{'patron'} and $opts{'patron'})
779 0 0 unless ($opts{'patron'} =~ /^\d+$/)
783 0 0 unless ($opts{'resource'} =~ /^\d+$/)
794 0 0 unless ($opts{'resource'} =~ /^\d+$/)
805 0 0 unless ($opts{'resource'} =~ /^\d+$/)
817 0 0 unless ($opts{'patron'} =~ /^\d+$/)
836 0 0 if ($self->patron_id)
840 0 0 if ($rv != 1)
876 1 0 if (defined $password) { }