Branch Coverage

lib/Net/Domain/ExpireDate.pm
Criterion Covered Total %
branch 137 174 78.7


line true false branch
39 0 4 if ($USE_REGISTRAR_SERVERS == 0) { }
0 4 elsif ($USE_REGISTRAR_SERVERS == 1) { }
4 0 elsif ($USE_REGISTRAR_SERVERS == 2) { }
56 0 5 unless $domain =~ /(.+?)\.([^.]+)$/
61 1 4 if ($USE_REGISTRAR_SERVERS == 0) { }
0 4 elsif ($USE_REGISTRAR_SERVERS == 1) { }
4 0 elsif ($USE_REGISTRAR_SERVERS == 2) { }
72 5 0 if $format
82 0 4 unless $domain =~ /(.+?)\.([^.]+)$/
85 0 4 $via_registry ? :
87 4 0 if $format
100 23 60 $cre_date ? :
101 73 10 $exp_date ? :
102 6 77 $fre_date ? :
128 13 70 if (_isin($tld, ['ru', 'su', 'xn--p1ai', 'pp.ru', 'net.ru', 'org.ru']))
132 1 69 if ($tld eq 'jp')
136 60 10 $flags & 1 ? :
137 16 54 $flags & 2 ? :
152 10 99 unless $date
157 0 99 if ($@)
168 0 9 if $CACHE_DIR
169 0 9 if $CACHE_TIME
175 0 60 unless $whois
192 7 53 if ($whois =~ /\sexpir.+?:?\s+(\d{2})[- ](\w{3})[- ](\d{4})/is) { }
2 51 elsif ($whois =~ /(?:Expi\w+|Renewal) (?:Date|On):\s*(\d{2})-(\w{3})-(\d{4})/is) { }
21 30 elsif ($whois =~ m[(?:Record |Domain )?(?:will )?(?:be )?expir(?:e|ed|es|ing|ation)(?: on)?(?: date)?\s*[-:]?\s*(\d{4})[/-](\d{1,2})[/-](\d{1,2})]is) { }
5 25 elsif ($whois =~ m[(?:Expiry|Expiry Date|expire-date|Expire(?:d|s)? on|Valid[ -][Dd]ate|[Ee]xpiration [Dd]ate|Date of expiration|Renewal[- ][Dd]ate)(?:\.*|\s*):?\s+(\d{4})[/.-] ?(\d{2})[/.-] ?(\d{2})]is) { }
1 24 elsif ($whois =~ /expires?:\s+(\d{4})(\d{2})(\d{2})/is) { }
1 23 elsif ($whois =~ m[(?:validity|Expiry Date|expires?(?:\.*)(?: at)?|expiration date(?: \(dd/mm/yyyy\))?):\s+(\d{1,2})[./-](\d{1,2})[./-](\d{4})]is) { }
1 22 elsif ($whois =~ /Expires on\.*: (\d{2})-(\w{3})-(\d{2})/s) { }
7 15 elsif ($whois =~ /(?:Record )?expires(?: on)?\.* ?:? +(?:\w{3}, )?(\w{3,9})\s{1,2}(\d{1,2}),? (\d{4})/is) { }
2 13 elsif ($whois =~ /(?:Created|Expires) (?:on|after)\s?\.*:?\s*\w{3},? (\w{3})\s{1,2}(\d{1,2})(?: \d{2}:\d{2}:\d{2})? (\d{4})?/is) { }
2 11 elsif ($whois =~ /(?:Domain )?(?:Expires|Expiration Date):\s+\w{3} (\w{3}) (\d{2}) (?:\d{2}:\d{2}:\d{2} \w{3}(?:[-+]\d{2}:\d{2})? )(\d{4})/is) { }
3 8 elsif ($whois =~ /expires.+?(\d{2})-(\d{2})-(\d{4})/is) { }
2 6 elsif ($whois =~ m[(?:Expiration|Expires on):? (\d{1,2})[-/](\d{1,2})[-/](\d{4})]is) { }
0 6 elsif ($whois =~ /Expiration Date.+?(\d{2})-(\d{2})-(\d{4}) \d{2}:\d{2}:\d{2}/is) { }
0 6 elsif ($whois =~ /Registered on.+?(\d{2})-(\w{3})-(\d{4})/is) { }
3 3 elsif ($whois =~ /(?:Record |Domain )?expires on\.*:? (\d{4})-(\w{3})-(\d{1,2})/is) { }
1 2 elsif ($whois =~ m[Expiration date: (\d{2})/(\d{2})/(\d{2})]s) { }
0 2 elsif ($whois =~ /Registered through- (\w{3}) (\w{3}) (\d{2}) (\d{4})/is) { }
0 2 elsif ($whois =~ m[Expires: (\d{2})/(\d{2})/(\d{2})]is) { }
0 2 elsif ($whois =~ m[Registered through- (\d{2})/(\d{2})/(\d{2})]is) { }
1 1 elsif ($whois =~ m( \[\x{6709}\x{52b9}\x{671f}\x{9650}\] \s+ ( \d{4} ) / ( \d{2} ) / ( \d{2} ))sx) { }
1 0 elsif ($whois =~ /status:\s+OK-UNTIL (\d{4})(\d{2})(\d{2})\d{6}/s) { }
314 60 0 if ($rulenum) { }
324 58 2 $Y ? :
325 58 2 $Y ? :
327 3 57 if ($b and length $b > 3) { }
21 36 elsif ($b and length $b == 3) { }
337 24 36 $b ? :
348 0 16 unless $whois
361 3 13 if ($whois =~ /Creat(?:ion|ed On|e)[^:]*?:?\s*(\d{2})[- ](\w{3})[- ](\d{4})/is) { }
4 9 elsif ($whois =~ m[(?:Creat.+?|Registration Date):?\s*?(\d{4})[/-](\d{1,2})[/-](\d{1,2})]is) { }
2 7 elsif ($whois =~ /(?:created|registered)(?:\.*):\s+(\d{1,2})[-.](\d{1,2})[-.](\d{4})/is) { }
0 7 elsif ($whois =~ /(?:created|registered):\s+(\d{4})[-.](\d{2})[-.](\d{2})/is) { }
0 7 elsif ($whois =~ /created?:\s+(\d{4})(\d{2})(\d{2})/is) { }
0 7 elsif ($whois =~ /changed:.+?(\d{4})(\d{2})(\d{2})/is) { }
3 4 elsif ($whois =~ /Creat.+?:?\s*(?:\w{3}, )?(\w{3,9})\s{1,2}(\d{1,2}),? (\d{4})/is) { }
1 3 elsif ($whois =~ /Regist.+?:\s*\w{3} (\w{3})\s+(\d{1,2}) (?:\d{2}:\d{2}:\d{2} )?(\d{4})/is) { }
1 2 elsif ($whois =~ /Registration.*?:\s+\w{3} (\w{3}) (\d{2}) (?:\d{2}:\d{2}:\d{2} \w{3}(?:[-+]\d{2}:\d{2})? )?(\d{4})/is) { }
0 2 elsif ($whois =~ /created.+?(\d{2})-(\d{2})-(\d{4})/is) { }
0 2 elsif ($whois =~ /Creation Date.+?(\d{2})-(\d{2})-(\d{4}) \d{2}:\d{2}:\d{2}/is) { }
1 1 elsif ($whois =~ m( \[\x{767b}\x{9332}\x{5e74}\x{6708}\x{65e5}\] \s+ ( \d{4} ) / ( \d{2} ) / ( \d{2} ) )sx) { }
1 0 elsif ($whois =~ /created:\s+0-UANIC (\d{4})(\d{2})(\d{2})\d{6}/s) { }
409 16 0 $Y ? :
410 16 0 $Y ? :
412 1 15 if ($b and length $b > 3) { }
7 8 elsif ($b and length $b == 3) { }
422 8 8 $b ? :
433 0 13 unless $whois
437 5 8 if $whois =~ /reg-till:\s*(.+?)\n/s
438 0 13 if $whois =~ /payed-till:\s*(.+?)\n/s
439 2 11 if $whois =~ /paid-till:\s*(.+?)\n/s
440 6 7 if $whois =~ /free-date:\s*(.+?)\n/s
441 7 6 if $whois =~ /created:\s+(.+?)\n/s
442 3 10 if $whois =~ /Delegated till\s*(.+?)\n/s
446 2 9 if ($created and $created =~ /\./ or $reg_till and $reg_till =~ /\./ or $free_date and $free_date =~ /\./)
456 3 1 if $reg_till
457 1 3 if $free_date
458 2 2 if $created
461 7 6 if ($created)
467 0 7 if ($t and not $reg_till and not $free_date)
470 0 0 $t->is_leap_year ? :
476 0 13 unless ($reg_till or $free_date)
484 3 10 if (not $reg_till and $free_date)
493 0 83 unless $arr
496 13 425 if $_ eq $val