Branch Coverage

lib/Net/Domain/ExpireDate.pm
Criterion Covered Total %
branch 136 174 78.1


line true false branch
39 0 3 if ($USE_REGISTRAR_SERVERS == 0) { }
0 3 elsif ($USE_REGISTRAR_SERVERS == 1) { }
3 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 3 unless $domain =~ /(.+?)\.([^.]+)$/
85 0 3 $via_registry ? :
87 3 0 if $format
100 23 59 $cre_date ? :
101 72 10 $exp_date ? :
102 6 76 $fre_date ? :
128 13 69 if (_isin($tld, ['ru', 'su', 'xn--p1ai', 'pp.ru', 'net.ru', 'org.ru']))
132 1 68 if ($tld eq 'jp')
136 59 10 $flags & 1 ? :
137 16 53 $flags & 2 ? :
152 10 98 unless $date
157 0 98 if ($@)
168 0 8 if $CACHE_DIR
169 0 8 if $CACHE_TIME
175 0 59 unless $whois
192 6 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) { }
7 23 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 22 elsif ($whois =~ /expires?:\s+(\d{4})(\d{2})(\d{2})/is) { }
1 21 elsif ($whois =~ m[(?:validity|Expiry Date|expires?(?:\.*)(?: at)?|expiration date(?: \(dd/mm/yyyy\))?):\s+(\d{1,2})[./-](\d{1,2})[./-](\d{4})]is) { }
1 20 elsif ($whois =~ /Expires on\.*: (\d{2})-(\w{3})-(\d{2})/s) { }
7 13 elsif ($whois =~ /(?:Record )?expires(?: on)?\.* ?:? +(?:\w{3}, )?(\w{3,9})\s{1,2}(\d{1,2}),? (\d{4})/is) { }
2 11 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) { }
0 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 59 0 if ($rulenum) { }
324 57 2 $Y ? :
325 57 2 $Y ? :
327 3 56 if ($b and length $b > 3) { }
18 38 elsif ($b and length $b == 3) { }
337 21 38 $b ? :
348 0 16 unless $whois
361 2 14 if ($whois =~ /Creat(?:ion|ed On|e)[^:]*?:?\s*(\d{2})[- ](\w{3})[- ](\d{4})/is) { }
5 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) { }
6 9 elsif ($b and length $b == 3) { }
422 7 9 $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 82 unless $arr
496 13 419 if $_ eq $val