Subject: | ".uk" domain look-up failing (Patch included) |
Date: | Tue, 7 Apr 2009 21:04:18 +0100 |
To: | bug-Net-Domain-ExpireDate [...] rt.cpan.org |
From: | Adam McGreggor <cpan [...] amyl.org.uk> |
Distribution name and version: Net-Domain-ExpireDate-0.94
Perl version: (a) v5.10.0
(b) v5.8.8
OS vendor and version:
(a) Linux kreacher 2.6.27-14-generic #1 SMP Fri Mar 13
18:00:20 UTC 2009 i686 GNU/Linux
(b) Linux tanqueray 2.6.22 #10 Mon Mar 3 16:14:52 GMT
2008 i686 GNU/Linux
== Description ==
On attempting to look up .uk domains, via the module, and also via
domdates (from the distro), I received the "Can't recognise creation
date format" error. It appeared that the registry info had changed...
... this annoyed me.
== Reproduction ==
untar
<http://search.cpan.org/CPAN/authors/id/D/DE/DESPAIR/Net-Domain-ExpireDate-0.94.tar.gz>,
and run "domdates mysociety.org.uk" (for example).
== Patch ==
(hope in-line's fine)
--- xpireDate.pm-old 2009-04-07 19:11:21.000000000 +0100
+++ ExpireDate.pm 2009-04-07 20:41:46.000000000 +0100 # my version
@@ -339,6 +339,11 @@
# [whois.belizenic.bz] Creation Date....: 15-01-2003 05:00:00
} elsif ($whois =~ m&Creation Date.+?(\d{2})-(\d{2})-(\d{4})\d{2}:\d{2}:\d{2}&is) {
$rulenum = 5.3; $d = $1; $m = $2; $Y = $3;
+ # edit for .uk domains: Adam McGreggor <cpan@amyl.org.uk>;
+ # kudos on a typo to <ganesh@urchin.earth.li>, via irc.mysociety.org
+ # [whois.nic.uk] Registered on: 21-Oct-2003
+ } elsif ($whois =~ m&Registered on.+?(\d{2})-(\w{3})-(\d{4})&is) {
+ $rulenum = 5.4; $d = $1; $b = $2; $Y = $3;
} else {
warn "Can't recognise creation date format\n";
return undef;
== Testing ==
With that edit in place, the look-up returns the creation/registered
date, as expected (for me)
HTH
--
``Large increases in cost with questionable increases in performance
can be tolerated only in racehorses and fancy women.'' (Lord Kelvin)