Branch Coverage

blib/lib/IO/EPP/Test/VerisignCore.pm
Criterion Covered Total %
branch 327 482 67.8


line true false branch
39 29 137 if (not $out_data or $out_data =~ m[]+/>]) { }
28 109 elsif ($out_data and $out_data =~ //) { }
0 109 elsif ($out_data and $out_data =~ /
1 108 elsif ($out_data and $out_data =~ /
9 99 elsif ($out_data and $out_data =~ /
4 95 elsif ($out_data and $out_data =~ /
13 82 elsif ($out_data and $out_data =~ /
3 79 elsif ($out_data and $out_data =~ /
1 78 elsif ($out_data and $out_data =~ /
9 69 elsif ($out_data and $out_data =~ /
10 59 elsif ($out_data and $out_data =~ /
6 53 elsif ($out_data and $out_data =~ /
19 34 elsif ($out_data and $out_data =~ /
6 28 elsif ($out_data and $out_data =~ /
28 0 elsif ($out_data and $out_data =~ m[]) { }
126 0 28 if ($m == 1 || $m == 3 || $m == 5 || $m == 7 || $m == 8 || $m == 10 || $m == 12 and $d > 31)
131 0 28 if ($m == 4 || $m == 6 || $m == 9 || $m == 11 and $d > 30)
136 0 0 if ($m == 2 and $y % 4 == 0 and $d > 29)
141 0 0 if ($m == 2 and $y % 4 != 0 and $d > 28)
146 0 28 if ($m == 13)
151 0 28 if $d < 10
152 28 0 if $m < 10
168 0 2 if ($dt =~ /^\d{4}-02-29/ and $y % 4 != 0)
231 7 6 if ($ext) { }
246 0 2 if ($ext) { }
291 0 25 if ($now gt $dom->{'exp_date'} and not $dom->{'statuses'}{'pendingDelete'})
295 0 0 if ($end_auto_renew gt $now)
301 5 20 if ($dom->{'statuses'}{'pendingDelete'})
305 0 5 if ($now gt $end_del_date)
309 2 3 if ($dom->{'statuses'}{'pendingRestore'})
312 0 2 if ($now gt $end_rest_date)
330 0 28 unless ($body =~ s/^<\?xml version="1.0" encoding="UTF-8"\?>\s+//s)
336 0 28 unless ($body =~ s/^\s+//s)
342 0 28 unless ($body =~ s[\s*\s*][]s)
348 0 28 unless ($body =~ s/\s*//s)
354 0 28 unless ($body =~ s[\s*][]s)
360 0 28 unless ($body =~ s/\s*//s)
368 0 28 unless ($cltrid)
374 0 28 unless ($body =~ s[\s*.+$][]s)
382 0 28 unless $login
389 0 28 if (not $pass or length $pass < 6)
397 0 28 if ($pass eq 'fail-pass')
415 0 81 unless ($$body_ref =~ s/^<\?xml version="1.0" encoding="UTF-8"\?>\s+//s)
421 0 81 unless ($$body_ref =~ s/^\s+//s)
427 0 81 unless ($$body_ref =~ s[\s*\s*][]s)
433 0 81 unless ($$body_ref =~ s/\s*//s)
439 0 81 unless ($$body_ref =~ s[\s*][]s)
447 81 0 if ($cltrid) { }
456 0 81 unless ($$body_ref =~ m[dot(COM|NET|EDU)])
460 0 81 unless ($$body_ref =~ s[\s*]+>.+][]s)
465 81 0 if ($$body_ref =~ s/<(check|create|info|renew|update|delete)>\s*//s) { }
474 0 81 unless ($$body_ref =~ s[\s*.+$][]s)
481 81 0 if ($$body_ref =~ s/\s*<(host|domain):${cmd}[^<>]+>\s*//s) { }
490 0 81 unless ($$body_ref =~ s[\s*\s*][]s)
507 0 1 if ($chb[0]) { }
516 0 1 unless (scalar @hosts)
531 0 5 if ($s->data->{'nss'}{$ns}) { }
2 3 elsif (not $ns =~ /^[0-9a-z\.\-]+\.[0-9a-z\-]+$/) { }
554 0 9 if ($chb[0]) { }
563 9 0 if ($body =~ m[([^<>]+)]) { }
572 1 8 unless ($ns =~ /^[0-9a-z][0-9a-z\-\.]*[0-9a-z]\.[0-9a-z][0-9a-z\-]*[0-9a-z]$/)
584 2 6 if ($nss->{$ns})
585 1 1 if ($nss->{$ns}{'owner'} eq $obj->{'user'}) { }
598 5 1 if ($tld =~ /^(com|net|edu)$/)
602 1 4 unless ($doms->{$dname})
606 0 4 if ($doms->{$dname}{'owner'} ne $obj->{'user'})
613 1 3 if (scalar(@v4) + scalar(@v6) == 0)
618 0 2 unless ($v =~ /^\d+\.\d+\.\d+\.\d+$/)
623 1 1 unless ($v =~ /^[0-9a-z:]{1,29}$/)
641 2 1 if ($dname)
657 0 4 if ($chb[0]) { }
666 4 0 if ($body =~ m[([^<>]+)]) { }
675 1 3 unless ($ns =~ /^[0-9a-z][0-9a-z\-\.]*[0-9a-z]\.[0-9a-z][0-9a-z\-]*[0-9a-z]$/)
684 1 2 unless ($s->data->{'nss'}{$ns})
690 1 1 if ($host->{'owner'} ne $obj->{'user'})
709 0 1 if ($host->{'updater'}) { }
715 0 1 if ($host->{'upd_date'}) { }
735 0 13 if ($chb[0]) { }
744 13 0 if ($body =~ m[([^<>]+)]) { }
753 0 13 unless ($ns =~ /^[0-9a-z][0-9a-z\-\.]*[0-9a-z]\.[0-9a-z][0-9a-z\-]*[0-9a-z]$/)
762 1 12 unless ($s->data->{'nss'}{$ns})
768 1 11 if ($host->{'owner'} ne $obj->{'user'})
776 12 5 if ($body =~ m[(.+?)]s)
783 0 5 unless ($v =~ /^\d+\.\d+\.\d+\.\d+$/)
787 2 3 if ($act eq 'add') { }
788 1 1 if ($host->{'addr_v4'}{$v})
795 1 2 unless ($host->{'addr_v4'}{$v})
804 1 1 unless ($v =~ /^[0-9a-f:]{1,29}$/)
808 0 1 if ($act eq 'add') { }
809 0 0 if ($host->{'addr_v6'}{$v})
816 0 1 unless ($host->{'addr_v6'}{$v})
827 1 5 unless ($st =~ /^(clientDeleteProhibited|clientUpdateProhibited|linked|ok|pendingCreate|pendingDelete|pendingTransfer|pendingUpdate| serverDeleteProhibited|serverUpdateProhibited)$/)
831 1 4 unless ($st =~ /^(clientDeleteProhibited|clientUpdateProhibited)$/)
835 2 2 if ($act eq 'add') { }
836 1 1 if ($host->{'statuses'}{$st})
843 1 1 unless ($host->{'statuses'}{$st})
853 1 3 if (scalar(@a4) + scalar(@a6) == 0 and scalar(@d4) + scalar(@d6) > 0)
854 1 0 if (scalar(@d4) + scalar(@d6) == scalar(keys %{$$host{'addr_v4'};}) + scalar(keys %{$$host{'addr_v6'};}))
859 0 3 if ($body =~ m[] or $body =~ m[])
920 0 3 if ($chb[0]) { }
929 3 0 if ($body =~ m[([^<>]+)]) { }
938 0 3 unless ($ns =~ /^[0-9a-z][0-9a-z\-\.]*[0-9a-z]\.[0-9a-z][0-9a-z\-]*[0-9a-z]$/)
947 1 2 unless ($s->data->{'nss'}{$ns})
953 1 1 if ($host->{'owner'} ne $obj->{'user'})
957 0 1 if ($host->{'statuses'}{'linked'})
963 1 0 if ($ns =~ /\b(com|net|edu)$/)
986 0 1 if ($chb[0]) { }
995 0 1 unless (scalar @domains)
1009 0 6 if ($doms->{$dm}) { }
1 5 elsif (not $dm =~ /^[0-9-a-z\-]+\.[a-z]+$/) { }
0 5 elsif ($dm =~ /^reg*\.(com|net|edu)$/) { }
4 1 elsif ($dm =~ /\.(com|net|edu)$/) { }
1022 3 1 int rand 10 > 1 ? :
1024 3 1 if ($avail) { }
1056 0 9 if ($chb[0]) { }
1064 9 0 if ($body =~ m[([^<>]*)]) { }
1071 0 9 unless ($dname)
1075 1 8 unless ($dname =~ /^[0-9a-z][0-9a-z\-]*[0-9a-z]\.[0-9a-z][0-9a-z\-]+[0-9a-z]$/)
1081 2 6 if ($tld ne lc $subProduct)
1086 6 0 if ($body =~ m[([^<>]*)]) { }
1093 0 6 unless ($period and $period =~ /^[0-9]+$/)
1097 0 6 if ($period < 1)
1101 0 6 if ($period > 99)
1105 1 5 if ($period > 10)
1110 2 3 if ($body =~ m[(.+)]s)
1116 0 4 unless ($row)
1120 0 4 unless ($row =~ /^([0-9a-z][0-9a-z\-]*[0-9a-z]\.)+[0-9a-z][0-9a-z\-]*[0-9a-z]$/)
1129 5 0 if ($body =~ m[(.*)]s) { }
1132 5 0 if ($row and $row =~ m[(.*)]s) { }
1135 0 5 unless ($authinfo)
1139 0 4 unless ($authinfo =~ /[A-Z]/ and $authinfo =~ /[a-z]/ and $authinfo =~ /[0-9]/ and $authinfo =~ m([!\@\$\%*_.:\-=+?#,"'\\/<>\[\]\{\}]))
1156 1 3 if ($dname =~ /^xn--/ and not $lang)
1160 1 2 if ($doms->{$dname} or $dname =~ /^reg/)
1166 1 2 unless ($hosts->{$ns})
1217 0 10 if ($chb[0]) { }
1225 10 0 if ($body =~ m[([^<>]*)]) { }
1226 0 10 if $2
1233 0 10 unless ($dname)
1237 1 9 unless ($dname =~ /^[0-9a-z][0-9a-z\-]*[0-9a-z]\.[0-9a-z][0-9a-z\-]+[0-9a-z]$/)
1243 1 8 if ($tld ne lc $subProduct)
1250 1 7 unless ($s->data->{'doms'}{$dname})
1256 0 7 unless ($s->data->{'doms'}{$dname})
1263 0 7 if ($dm->{'owner'} ne $obj->{'user'})
1271 7 0 if (scalar keys %{$$dm{'nss'};})
1280 7 0 if (not $show_hosts or $show_hosts ne 'none')
1291 0 7 if $dm->{'tr_date'}
1299 7 0 if ($now lt $c5d)
1303 5 2 $dm->{'ren_date'} ? :
1304 5 2 if ($r5d and $now lt $r5d)
1308 0 7 $dm->{'tr_date'} ? :
1309 0 7 if ($t5d and $now lt $t5d)
1313 0 7 if ($now gt $dm->{'exp_date'})
1318 2 5 if ($dm->{'statuses'}{'pendingDelete'})
1321 2 0 if ($now lt $d5d) { }
1332 7 0 if ($rgp)
1350 0 6 if ($chb[0]) { }
1358 6 0 if ($body =~ m[([^<>]*)]) { }
1365 0 6 unless ($dname)
1369 1 5 unless ($dname =~ /^[0-9a-z][0-9a-z\-]*[0-9a-z]\.[0-9a-z][0-9a-z\-]+[0-9a-z]$/)
1375 0 5 if ($tld ne lc $subProduct)
1380 5 0 if ($body =~ m[(.+)]) { }
1388 5 0 if ($user_edt =~ /(\d{4})-(\d{2})-(\d{2})/)
1392 1 4 unless ($yy and $yy >= 1000 and $yy <= 9999 and ($mm and $mm <= 13) and ($dd and $dd <= 31))
1397 4 0 if ($body =~ m[(\d+)]) { }
1404 1 3 if ($period < 1 or $period > 10)
1411 0 3 unless ($s->data->{'doms'}{$dname})
1417 0 3 unless ($s->data->{'doms'}{$dname})
1423 0 3 if ($dm->{'owner'} ne $obj->{'user'})
1427 0 3 if ($dm->{'statuses'}{'serverRenewProhibited'} or $dm->{'statuses'}{'clientRenewProhibited'} or $dm->{'statuses'}{'pendingDelete'})
1431 1 2 if ($dm->{'ren_date'} and add_5d($dm->{'ren_date'}) gt get_date())
1437 1 1 if ($user_edt ne $edt)
1446 0 1 if ($y1 - $y0 + $period > 10)
1469 2 17 if ($body =~ m[]+>\s*(.+)\s*]s)
1475 0 19 if ($chb[0]) { }
1483 19 0 if ($body =~ m[([^<>]*)]) { }
1490 0 19 unless ($dname)
1494 1 18 unless ($dname =~ /^[0-9a-z][0-9a-z\-]*[0-9a-z]\.[0-9a-z][0-9a-z\-]+[0-9a-z]$/)
1500 1 17 if ($tld ne lc $subProduct)
1508 7 10 if ($body =~ m[\s*(.+)\s*]s)
1511 0 7 if ($add =~ /domain:contact/)
1520 1 0 if ($row =~ m[])
1525 0 1 unless ($statuses{$st})
1539 2 0 if ($row =~ m[([^<>]*)])
1544 1 1 unless ($statuses{$st})
1551 4 2 if ($add =~ m[(.+)]s)
1558 4 0 if ($row =~ m[([^<>]+)]) { }
1567 4 0 if ($ns =~ /^[0-9a-z.\-]+$/) { }
1577 4 12 if ($body =~ m[\s*(.+)\s*]s)
1580 0 4 if ($rem =~ /domain:contact/)
1589 1 0 if ($row =~ m[])
1593 0 1 unless ($statuses{$st})
1600 3 1 if ($rem =~ m[(.+)]s)
1607 3 0 if ($row =~ m[([^<>]+)]) { }
1616 3 0 if ($ns =~ /^[0-9a-z.\-]+$/) { }
1626 4 12 if ($body =~ m[\s*(.+)\s*]s)
1629 1 3 if ($chg =~ /domain:registrant/)
1633 3 0 if ($chg =~ m[([^<>]*)]s)
1636 1 2 unless ($key and length $key >= 16 and length $key <= 48)
1640 0 1 unless ($key =~ /[a-z]/ and $key =~ /[A-Z]/ and $key =~ /[0-9]/ and $key =~ m(["'.,\-\[\]\\|/!?\$\%\@*()+=_{}:;]))
1648 1 12 unless (scalar(keys %add) + scalar(keys %rem) + scalar(keys %chg) or $rgp)
1654 1 11 unless ($s->data->{'doms'}{$dname})
1660 0 11 unless ($s->data->{'doms'}{$dname})
1667 0 11 if ($dom->{'owner'} ne $obj->{'user'})
1671 2 9 if ($rgp)
1672 0 2 unless ($rgp =~ /restore op="[a-z]+"/)
1676 1 1 if ($rgp =~ /restore op="request"/)
1677 0 1 unless ($dom->{'statuses'}{'pendingDelete'})
1684 0 1 if ($now gt $last_redem_date)
1694 1 0 if ($rgp =~ /restore op="report"/)
1695 0 1 unless ($dom->{'statuses'}{'pendingRestore'})
1703 2 0 if ($nss->{$ns}) { }
1717 1 8 if ($dom->{'statuses'}{'serverUpdateProhibited'} or $dom->{'statuses'}{'clientUpdateProhibited'} and not $rem{'statuses'}{'clientUpdateProhibited'})
1722 0 1 if ($dom->{'statuses'}{$st})
1728 0 1 unless ($dom->{'statuses'}{$st})
1734 1 2 unless ($nss->{$ns})
1738 0 2 if ($dom->{'nss'}{$ns})
1744 1 2 unless ($dom->{'nss'}{$ns})
1754 1 5 if ($dom->{'statuses'}{'ok'} and scalar keys %{$$dom{'statuses'};} > 1)
1758 1 5 unless (scalar keys %{$$dom{'statuses'};})
1773 2 0 if $nss->{$ns}{'statuses'}{'linked'} == 0
1776 1 5 if $chg{'authInfo'}
1794 0 6 if ($chb[0]) { }
1802 6 0 if ($body =~ m[([^<>]*)]) { }
1809 0 6 unless ($dname)
1813 1 5 unless ($dname =~ /^[0-9a-z][0-9a-z\-]*[0-9a-z]\.[0-9a-z][0-9a-z\-]+[0-9a-z]$/)
1819 0 5 if ($tld ne lc $subProduct)
1825 1 4 unless ($s->data->{'doms'}{$dname})
1831 0 4 unless ($s->data->{'doms'}{$dname})
1838 1 3 if ($dom->{'owner'} ne $obj->{'user'})
1842 3 0 if ($dom->{'hosts'})
1846 1 2 if ($nss->{$h}{'statuses'}{'linked'})
1852 1 1 if ($dom->{'statuses'}{'serverUpdateProhibited'} or $dom->{'statuses'}{'clientUpdateProhibited'} or $dom->{'statuses'}{'serverDeleteProhibited'} or $dom->{'statuses'}{'clientDeleteProhibited'} or $dom->{'statuses'}{'pendingDelete'})
1857 0 1 if ($nss->{$ns}{'statuses'}{'linked'})
1860 0 0 if ($nss->{$ns}{'statuses'}{'linked'} == 0)
1877 0 28 unless ($body =~ s/^<\?xml version="1.0" encoding="UTF-8"\?>\s+//s)
1883 0 28 unless ($body =~ s/^\s+//s)
1889 0 28 unless ($body =~ s[\s*\s*][]s)
1895 0 28 unless ($body =~ s/\s*//s)
1901 0 28 unless ($body =~ s[\s*][]s)
1909 0 28 unless ($cltrid)
1915 0 28 unless ($body =~ s[\s*][]s)